【发布时间】:2014-07-16 22:25:58
【问题描述】:
尝试在 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 的引导程序和/或测试套件 XML 文件,但我不确定如何在 PhpStorm 中执行此操作。在各种配置屏幕中,没有什么让我眼前一亮。请帮忙。
【问题讨论】:
-
设置 -> PHP -> PHPUnit -> 有引导和配置的输入
-
太棒了。 :) 如果您将您的评论作为答案,我会投票并标记它。