Data structures, algorithms, design patterns and code katas implementations with PHP with Unit Tests and documentation.
- PHP 8.2.4 compatible
- Composer
composer install
On Windows:
vendor\bin\phpunit --version
On Linux:
./vendor/bin/phpunit --version
Run the tests with PHPUnit:
vendor\bin\phpunit -c tests
Be sure to have the X-Debug PHP extension:
vendor\bin\phpunit -c tests --coverage-html=coverage
Installing X-Debug:
- Download X-Debug for you operating system
- In Windows: copy the dll file in the php\ext directory
- Rename the dll file to: php_xdebug.dll
Configuration on php.ini file:
output_buffering=off
[XDebug]
zend_extension=xdebug
xdebug.mode=debug,coverage
xdebug.start_with_request=trigger
For each test run, the PHPUnit command-line tool prints one character to indicate progress:
. => Printed when a successful test has no issues F => Printed when an assertion fails while running the test method E => Printed when an error occurs while running the test method W => Printed when the test triggered a warning R => Printed when the test has been considered risky (see Risky Tests) D => Printed when the test triggered a deprecation N => Printed when the test triggered a notice I => Printed when the test is marked as incomplete (see Incomplete Tests) S => Printed when the test was skipped (see Skipping Tests)
To activate verbose mode, change testdox="false" to testdox="true" in phpunit.xml.