PHPUnit and Yii problem

I have problem to run unit tests(PHPUnit) when Yii project is created with next structure:



So I created project with command yiiframework/yiic webapp my_project

When I am trying to run unit test(phpunit unit/SiteTest.php), I am getting following error(I am running it from right location protected/tests):

PHP Warning: require_once(PHPUnit/Autoload.php): failed to open stream: No such file or directory in /home/ivica/web/framework/test/CTestCase.php on line 12

PHP Fatal error: require_once(): Failed opening required ‘PHPUnit/Autoload.php’ (include_path=’.:/home/ivica/web/track/protected/components:/home/ivica/web/track/protected/models:/usr/bin:/usr/share/php:/usr/share/pear’) in /home/ivica/web/framework/test/CTestCase.php on line 12

But if I create first folder my_project, and copy yii framework files in it, and run command from my_project folder:

yiiframework/yiic webapp ./

Then phpunit is working correctly, but I want to have yii files outside webroot, and to use same installation for multiple projects.

So, this is for sure some issue with yii paths(php unit is installed correctly), can somebody suggest me how to solve the problem?

Ok, I finally found problem!

PHPUnit version on my system is 3.4.14, and PHPUnit/Autoload.php file is available since version 3.5(I think), so I have to update PHPUnit on my system(Linux Debian), or to change CTestCase to use old PHPUnit/Framework.php, which is not recommended.