Z
Z
zbender2014-04-11 16:57:13
Yii
zbender, 2014-04-11 16:57:13

Yii 1.1 and PHPUnit 4.0.14 - why are tests not running?

OpenServer 5.0.0
Yii 1.1
PHPUnit 4.0.14 Updated
OpenServer and phpunit.
Updated CTestCase like here https://github.com/yiisoft/yii/blob/master/framewo... Error
when running tests:

Fatal error: Uncaught exception 'PHPUnit_Framework_Error_Warning' with message 'include(PHPUnit_Extensions_Story_TestCase.php): failed to open stream: No such file or directory' in  \framework\YiiBase.php on line 423

PHPUnit_Framework_Error_Warning: include(PHPUnit_Extensions_Story_TestCase.php): failed to open stream: No such file or directory in \framework\YiiBase.php on line 423

PHPUnit after it is installed is contained in a single file of type phpunit (as far as I understand it is a phar type, but it has no extension)
File paths:
E:\OpenServer\modules\php\PHP-5.4.26\PEAR\PHPUnit\Extensions\ Story\
E:\OpenServer\modules\php\PHP-5.4.26\phpunit

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
HaruAtari, 2014-04-11
@zbender

I had a problem too. On Yii 1.1.14, phpunt 4+ did not start.
I dug for a long time - I found a discussion of this problem on some English-language forum. The thing is that Yii "breaks" the phpunit autoloader.
I solved this problem by installing phpunit 3.7.32 . It is this version. Because with 3.5 there was also a problem. What did they do there. But this version works fine.

S
Sergey, 2014-04-11
Protko @Fesor

Because it is not necessary to connect something for phpunit. Use composer and phpunit itself as a dev dependency. Just connect the composer autoloader after yii and everything will work.
If you are using the phar version, then it seems like you don’t need to include anything. But I'm not going to speak here.

Z
zbender, 2014-04-11
@zbender

By the way, this all manifested itself on Win8. On win7 - the same Yii project and the same OpenServer - everything works...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question