我刚刚安装了最新版本的 phpunit,当我运行演示测试时:
bin/phpunit src/Acme/DemoBundle/Tests/
我遇到了这个问题:
1) Acme\DemoBundle\Tests\Controller\DemoControllerTest::testIndex
RuntimeException: Unable to guess the Kernel directory.
以及引用内核的行
关于此演示测试为何不起作用的任何想法?
最佳答案
尝试从项目根目录运行 bin/phpunit -c app/src/Acme/DemoBundle/Tests/
。
有app/phpunit.xml.dist
phpunit配置文件,设置Symfony需要的一些选项。
关于testing - Symfony2 演示测试问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15215675/