我在Symfony2 bundle(ver 2.2.2)中遇到了Behat(2.4.*@dev)init进程的一些问题.命令后:
bin/behat --init "@CompanyAppBundle"
Run Code Online (Sandbox Code Playgroud)
behat目录是在应用程序根目录中创建的,而不是在bundle中创建的.输出是:
+d features - place your *.feature files here
+d features/bootstrap - place bootstrap scripts and static files here
+f features/bootstrap/FeatureContext.php - place your feature related code here
Run Code Online (Sandbox Code Playgroud)
问题出在哪儿?
Behat 无法找到您的配置,请尝试像这样指定它:
bin/behat -c alternative/location/to/behat.yml --init "@CompanyAppBundle"
Run Code Online (Sandbox Code Playgroud)
或者您尚未在(默认)配置中启用 Symfony2Extension,请尝试像这样指定它:
default:
extensions:
Behat\Symfony2Extension\Extension:
Run Code Online (Sandbox Code Playgroud)