3

全新安装 PHPUnit 3.7.7 和 Symfony2.1.2。当我尝试在作为演示预安装的 Acme 包上运行 PHPUnit 时,我收到以下错误:

$ phpunit -c app/
PHPUnit 3.7.7 by Sebastian Bergmann.

Configuration read from /home/kevin/www/diva/app/phpunit.xml.dist

E

Time: 4 seconds, Memory: 7.25Mb

There was 1 error:

1) Acme\DemoBundle\Tests\Controller\DemoControllerTest::testIndex
Symfony\Component\Config\Definition\Exception\InvalidConfigurationException: Unrecognized options "enable" under "framework.profiler"

/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php:278
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php:266
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php:270
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php:266
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Processor.php:35
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Processor.php:52
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/Extension.php:103
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php:62
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php:42
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php:39
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:119
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:453
/home/kevin/www/diva/app/bootstrap.php.cache:945
/home/kevin/www/diva/app/bootstrap.php.cache:854
/home/kevin/www/diva/app/bootstrap.php.cache:566
/home/kevin/www/diva/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php:43
/home/kevin/www/diva/src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php:11

FAILURES!
Tests: 1, Assertions: 0, Errors: 1.

有想法该怎么解决这个吗?

4

1 回答 1

2

删除framework.profiler删除app/config/config_test.yml错误,但似乎是一个草率的黑客,没有解决根本问题。

编辑:根据官方论坛,它包含在 2.1.2 标准版中可能是一个错误: http: //forum.symfony-project.org/viewtopic.php?f=32 &t=49451

于 2012-10-17T17:53:11.023 回答