2015-06-11 50 views
0

从Behat切换到v3中的Mink以使用无头浏览器进行测试时。它会自动停止从我的要素文件为我生成片段。Behat/Mink错误未生成以下步骤的代码片段

继续从文档设置features/bootstrap/FeatureContext.php。

behat 

# generates this error at the bottom of the output 
--- Snippets for the following steps in the default suite were not generated (check your configuration) 

在Behat风格就在它输出我需要设置的功能之前。

+0

看到底我觉得文档应该更新,并解释这再次显示更好的是,教程和示例很长一段时间看起来一样 – tristanbailey

回答

3

发现有些挠头,并与其他网站的例子黑客周围后的回答。 Drupal的使用是有帮助的。

水貂现在并不是要为你做它出于某种原因,你自己实现这些,似乎很奇怪,他们应该只是将其添加到文档。

所有需要做的是包括命名空间和“执行”,然后所有的好

https://behat-drupal-extension.readthedocs.org/en/3.0/localinstall.html

添加功能/引导/ FeatureContext.php

use Behat\Behat\Context\SnippetAcceptingContext; 

,并在年底你的类def“implements SnippetAcceptingContext”

class FeatureContext extends MinkContext implements SnippetAcceptingContext 

然后,所有的作品时,请贝哈特或添加自动将文件与

behat --append-snippets 

您将在输出像

u features/bootstrap/FeatureContext.php - `I should see "count" greater than "10"` definition added