PHP code example of dan-da / tester-php

1. Go to this page and download the library: Download dan-da/tester-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dan-da / tester-php example snippets




namespace tester;

class eq extends test_base {

    public function runtests() {
        $this->test1();
    }

    protected function test1() {

        $this->eq( 1, "1.00", 'one' );
        $this->eq( 2, "2.00", 'two' );
    }

}

$ ../tester.php 
Running tests in eq...
[pass] 1 == 1.00  |  one
[pass] 2 == 2.00  |  two


2 tests passed.
0 tests failed.

    "    "dan-da/tester-php"
    }

 git clone https://github.com/dan-da/hd-wallet-derive
 cd hd-wallet-derive
 php -r "readfile('https://getcomposer.org/installer');" | php
 php composer.phar install

$ cd tests
$ ../tester.php