PhpStorm 7.1.3,XDebug 2.2.3,Symfony 2.4 - 找不到WebTestCase

时间:2014-05-27 21:13:15

标签: symfony xdebug phpstorm

尝试在PhpStorm中运行我自己的Symfony单元测试时出现以下错误:

/usr/bin/php /home/kevin/www/src/Blah/MyBundle/Tests/Controller/HomeControllerTest.php
PHP Fatal error:  Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found in /home/kevin/www/src/Blah/MyBundle/Tests/Controller/HomeControllerTest.php on line 8
PHP Stack trace:
PHP   1. {main}() /home/kevin/www/src/Blah/MyBundle/Tests/Controller/HomeControllerTest.php:0

Fatal error: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found in /home/kevin/www/src/Blah/MyBundle/Tests/Controller/HomeControllerTest.php on line 8

Call Stack:
0.0002     234112   1. {main}() /home/kevin/www/src/Blah/MyBundle/Tests/Controller/HomeControllerTest.php:0


Process finished with exit code 255

一些研究告诉我,我可能不得不将PhpStorm / Xdebug指向Symfony的bootstrap和/或测试套件XML文件,但我不确定如何在PhpStorm中这样做。在各种配置屏幕中没有任何东西在跳出来。请帮忙。

1 个答案:

答案 0 :(得分:6)

虽然我使用的是IntelliJ IDEA,但配置相同,所以:

设置 - > PHP - > PHPUnit - 有bootstrap和config

的输入