1. Go to this page and download the library: Download thipages/quicktests 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/ */
thipages / quicktests example snippets
test ($qTestsOrList, $htmlOutput=false, $idFilter=null)
$html=QTests::test(Tests_Foo::class);
or
$html=QTests::test([Tests_Foo1::class,Tests_Foo2::class]);
// where Tests_Foo needs to have s static dataSet() method
// being an array of tests to perform and containing a 3 items array (actual,expected,description)
class Tests_Foo { // test group Tests_Foo
public static function dataSet() {
return [
[true, true, "True is true"], // test 1
[true, false, "true is not false"], // test 2
[1,"1", "Number 1 is not String 1"] // test 3
];
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.