我收到以下錯誤,當我試圖在我的symfony項目運行PHPUnit的運行PHPUnit時,「你不能在一個序列中,當定義一個映射項」:在symfony中
$ phpunit -c app
1) [...]\DefaultControllerTest::testIndex
Symfony\Component\Config\Exception\FileLoaderLoadException: Cannot import resource "/srv/http/typeform/app/config/config.yml" from "/srv/http/typeform/app/config/config_dev.yml".
/srv/http/typeform/vendor/symfony/src/Symfony/Component/Config/Loader/FileLoader.php:89
[...]
/srv/http/typeform/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php:39
/srv/http/typeform/src/QuickyForm/PublicBundle/Tests/Controller/DefaultControllerTest.php:11
Caused by
Symfony\Component\Yaml\Exception\ParseException: You cannot define a mapping item when in a sequence in "\/srv\/http\/typeform\/app\/config\/config.yml"
/usr/share/pear/Symfony/Component/Yaml/Parser.php:116
[...]
/srv/http/typeform/app/bootstrap.php.cache:520
/srv/http/typeform/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php:39
/srv/http/typeform/src/QuickyForm/PublicBundle/Tests/Controller/DefaultControllerTest.php:11
它似乎崩潰當我打電話static::createClient();
這裏是我的config_test.yml
imports:
- { resource: config_dev.yml }
您似乎缺少大部分來自config_test.yml的默認symfony內容 - 是否有任何特定原因? – redbirdo 2013-05-10 13:38:49
因爲我在測試,當我使用默認的config_test.yml時問題是一樣的 – gchain 2013-05-13 09:14:20