Tag: PHPUnit
PHPUnit is a programmer-oriented testing framework for PHP. It provides all functionalities to write and run automated tests to ensure the correctness of PHP code.
-
Enable debugging output in PHPUnit
When running PHPunit there are only dots and letters for each test by default: To enable debug output and get some more details about the tests running, simply add the logging section to phpunit.xml.dist: This will create a debug output and helps to track the tests: In my case, this helped when my code reached…
-
PHPUnit: faster and better unit tests with pcov
When using PHPUnit there are different ways to create a code coverage report. By default, XDebug is used. But as mention on different sites, XDebug is very slow and the generation of a code coverage report might take several minutes for big projects. phpdbg To speed up things, phpdbg can be used. This significantly speeds…