Anonymous
Anonymous

Reputation: 133

Fatal error: Class 'Doctrine\Tests\Common\Cache\CacheTest' not found

I am using interpreter 5.5 of WAMP server in PHPStorm 8.0.1. While running the project it gives me one error. When I use the interpreter c:\php\php it gives me another error.

Fatal error: Class 'Doctrine\Tests\Common\Cache\CacheTest' not found in C:\wamp\www\project\vendor\doctrine\cache\tests\Doctrine\Tests\Common\Cache\ApcCacheTest.php on line 8

Call Stack:
    0.0010     360784   1. {main}() C:\Users\AMIT\AppData\Local\Temp\ide-phpunit.php:0
    0.0990   14181504   2. IDE_Base_PHPUnit_TextUI_Command::main() C:\Users\AMIT\AppData\Local\Temp\ide-phpunit.php:486
    0.0990   14193936   3. PHPUnit_TextUI_Command->run() C:\Users\AMIT\AppData\Local\Temp\ide-phpunit.php:229
    0.1110   15786960   4. PHPUnit_Runner_BaseTestRunner->getTest() phar://C:/wamp/bin/php/php5.5.12/phpunit.phar/phpunit/TextUI/Command.php:127
    9.8476   16182168   5. PHPUnit_Framework_TestSuite->addTestFiles() phar://C:/wamp/bin/php/php5.5.12/phpunit.phar/phpunit/Runner/BaseTestRunner.php:63
    9.8546   16569672   6. PHPUnit_Framework_TestSuite->addTestFile() phar://C:/wamp/bin/php/php5.5.12/phpunit.phar/phpunit/Framework/TestSuite.php:405
    9.8556   16727008   7. PHPUnit_Util_Fileloader::checkAndLoad() phar://C:/wamp/bin/php/php5.5.12/phpunit.phar/phpunit/Framework/TestSuite.php:333
    9.8556   16727168   8. PHPUnit_Util_Fileloader::load() phar://C:/wamp/bin/php/php5.5.12/phpunit.phar/phpunit/Util/Fileloader.php:42
    9.8566   16734760   9. include_once('C:\wamp\www\project\vendor\doctrine\cache\tests\Doctrine\Tests\Common\Cache\ApcCacheTest.php') phar://C:/wamp/bin/php/php5.5.12/phpunit.phar/phpunit/Util/Fileloader.php:58

Upvotes: 4

Views: 2709

Answers (2)

oussaka
oussaka

Reputation: 960

I have the same problem.

  • Rename phpunit.xml.dist to phpunit.xml in app/ folder
  • Right click it and choose the Run 'phpunit.xml' option, Or press Alt + Shift + F10 in default key map, in phpunit.xml file

This way the Tests succeed and it doesn't give any errors.

Upvotes: 3

Samuvack
Samuvack

Reputation: 31

(in PhpStorm) Go to Tools > Composer > Add dependency ..

Search for: CacheTest

Click on install.

Cachetest

This worked for me!

Upvotes: 1

Related Questions