繁体   English   中英

如何更改Symfony2 Behat Bundle默认功能上下文文件(默认情况下为FeatureContext.php)

[英]How to change the Symfony2 Behat Bundle default Feature context file (FeatureContext.php by default)

我使用Symfony2 BehatBundle ,版本= v1.0.0,并且我想更改主要功能上下文文件的名称 现在,当我使用命令运行behat时:

app/console --env=test behat @NameOfMyBundle

使用文件src / NameOfMyBundle / Features / Context / FeatureContext.php

我想使用自定义的主要功能文件,例如src / NameOfMyBundle / Features / Context / MyCustomContext.php,但我不知道如何。 根据behat文档

按照约定,上​​下文类应称为FeatureContext,但这可以通过cli配置轻松更改。

但是,找不到此配置选项。 我尝试了类似的东西:

app/console --env=test behat @NameOfMyBundle --context "MyCustomContext"

但是失败了。

有谁知道如何更改此主要功能上下文文件(最好使用cli)?

谢谢!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM