I run phpunit from my ‘tests’ directory: phpunit unit
…and get the following error:
PHP Fatal error: Uncaught exception ‘CException’ with message ‘Application base path “protected” is not a valid directory.’ in /home/user/phpdev/yii/framework/base/CApplication.php:240
This error happens with other commands like: phpunit unit/MyTest.php, phpunit --bootstrap bootstrap.php unit
Thank you for your suggestion. I didn’t experience the error with a freshly yii skeleton app.
The error was actually caused by the yii-environment extension (http://www.yiiframework.com/extension/yii-environment). Install the protected/tests/bootstrap.php file provided with this extension and the problem is solved !