【发布时间】:2015-08-14 19:40:42
【问题描述】:
我使用 Symfony2 BehatBundle,version=v1.0.0 并且我想更改主要功能上下文文件的名称。现在,当我使用命令运行 behat 时:
app/console --env=test behat @NameOfMyBundle
使用文件 src/NameOfMyBundle/Features/Context/FeatureContext.php
我想使用自定义的主要功能文件,例如 src/NameOfMyBundle/Features/Context/MyCustomContext.php 但我不知道如何。根据behat documentation:
按照惯例,上下文类应该称为 FeatureContext,但这可以通过 cli 配置轻松更改。
但是,找不到此配置选项。我试过类似的东西:
app/console --env=test behat @NameOfMyBundle --context "MyCustomContext"
但它失败了。
有谁知道如何更改这个主要功能上下文文件(最好使用 cli)?
谢谢!
【问题讨论】: