开发者

PHP Fatal error: Class 'CTestCase' not found in

Just trying to run a simple test o开发者_C百科n my local box but i get the following error:

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

when running

$ phpunit UserTest

I guess my configuration must be missing something? I just can't figure out what.

Using:

OSX 10.6.7

PHP 5.3.4

PHPUnit 3.5.13

Yii 1.1.7


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


The error message is telling you that the class CTestCase cannot be located. PHPUnit accepts an --include-path option on the command line. You could try something like this:

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


I found the solution for me. But i am not sure whether this works for you all or not.

Here is the url for the solution

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜