I tried to write some code using PHPUnit. It seems the test runner does not pass the project path to the include_path, and so there is not any way I could access my production code from the tests. How this really should be used? All the examples on your web page seems to be testing some simple internal PHP functions, not actual production code.
If my test code contains require_once to load the production code to be tested:
The test execution fails with error:
E_COMPILE_ERROR: require_once(): Failed opening required 'includes/db_utils.php' (include_path='.:/usr/lib/php')
The current path when executing the test runner seems to be "/Applications/PhpStorm-95.74.app/bin", not for example my project root. If the php process would be run on the project root, or the include_path would be set accordingly, everything would be just fine.