I have been attempting to run PHPUnit unit tests on a preexisting project built on the Yii framework. Using the terminal in Ubuntu 15.04, I globally installed PHPUnit through Composer, and added "~/.composer/vendor/bin" to my path. The problem is, the tests fail to run. They return a warning and an error:
The Warning:
PHP Warning: require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in [Yii Project root]/framework/test/CTestCase.php on line 11
The Error:
PHP Fatal error: require_once(): Failed opening required 'PHPUnit/Runner/Version.php'
I know that the Version.php exists in
~/.composer/vendor/phpunit/phpunit/src/Runner
But it seems the PHP looks for it in the wrong place. Why can't Version.php be found by the require statement, and where should I install it so that it could?