PHPUnit ignoring include_path

Just downloaded PhpStorm, looks nice. I have however some issue running a PHPUnit test inside the IDE. My test requires an additional include_path to satisfy all the require_once statements. I added this path under "Settings > PHP > Include Paths > Add". However when I run the test, I get this error: E_COMPILE_ERROR: require_once(): Failed opening required 'network/plugins/gameperiodstats/class.IGamePeriodStatsLogger.php' (include_path='.:/usr/share/php:/usr/share/pear') - the named include_path does not include my custom path which I added. Anything I do wrong?

3 comments

Settings|PHP|include paths used only within IDE for include reference validation inspections. Please correct you actual php.ini (and then re-import it to settings).

0

Hello.

What if I'm working on several branches of same project or other project with similar file structure. In my boostrap.php file (specified in phpunit xml configuration file) I have correct include_path. This should be project specific. Or provide ability to add bootstrap script to phpunit runner. Or even beter replace custom runner with standard CLI runner :)


Regards.

0

What do you mean by "in boostrap.php file (specified in phpunit xml configuration file) I have correct include_path" ? Do you set include paths, using set_include_path() in bootstrap.php?
I probably haven't got you right, but what you do want is to use unique phpunit.xml file and provide different bootstrap files, depending on your branch, is it?

0

Please sign in to leave a comment.