views:

37

answers:

1

Hi fellow stackers,

I'm trying some supposedly nice features of PHPUnit, but I cannot generate a freakin' code coverage report. What I get is:

rolf@dev ~/projects/current/tests $ scripts/phpunit --configuration $PROJECTS/current/tests/conf/inc/tests.xml
[...]
Generating code coverage report, this may take a moment.
[...]
Fatal error: require_once(): Failed opening required 'lib/DataSource.php' (include_path=':::') in path/to/lib/WS/DataParser.php on line 10

However, in this very class, a specific include path is defined, and the require_once works like a charm when the application is launched.

Could it be that PHPUnit cannot solve include paths ?

Thanks in advance and long live stackoverflöw!

Rolf
A: 

Are you changing your include_path in any of your tests/code? Cuz it looks really odd (:::)

Rich
well, I've got an __autoload function just for unit tests that changes the include_path, but the class that cannot be parsed also defines an include path, so I don't understand...
Rolf
Your include_path of (include_path=':::') doesn't contain any actual path information, only path separators. That means the code may only look in the current directory for includes.
Rich