PHP Fatal error: Class 'CTestCase' not found in

Just try running a simple test in my local field, but I get the following error:

PHP Fatal error: Class 'CTestCase' not found in .... 

at startup

 $ phpunit UserTest 

I think my configuration should miss something? I just can't understand that.

Using:

OSX 10.6.7

PHP 5.3.4

PHPUnit 3.5.13

Yii 1.1.7

+4
source share
3 answers

Make sure you run phpunit in the same directory where your phpunit.xml is located. :)

+13
source

The error message states that the CTestCase class could not be found. PHPUnit accepts the --include-path option on the command line. You can try something like this:

 $ phpunit --include-path .:/path/to/dir/containing/CTestCase UserTest 
0
source

I have found a solution for me. But I'm not sure if this works for all of you or not.

Here is the solution url

http://www.yiiframework.com/forum/index.php/topic/4728-running-unit-tests-on-windows-problem/

0
source

All Articles