https://github.com/thipages/quicktests
Quick PHP Unit Tests
https://github.com/thipages/quicktests
php quick tests unit
Last synced: about 2 months ago
JSON representation
Quick PHP Unit Tests
- Host: GitHub
- URL: https://github.com/thipages/quicktests
- Owner: thipages
- License: mit
- Created: 2020-04-12T01:09:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-30T07:33:39.000Z (almost 5 years ago)
- Last Synced: 2025-02-08T10:20:13.959Z (3 months ago)
- Topics: php, quick, tests, unit
- Language: PHP
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# quicktests
Quick PHP Unit Tests### Installation
**composer** require thipages\quicktests### Usage of QTests class
#### through the following static method
```php
test ($qTestsOrList, $htmlOutput=false, $idFilter=null)
```#### Example
```php
$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
];
}
}```