yavin/behat-context-injection-extension
Composer 安装命令:
composer require yavin/behat-context-injection-extension
包简介
ability to inject other contexts to steps methods
README 文档
README
With this extension you can inject contexts into methods. It should work with Behat 3.1+
class MyContext implements Context { /** * @Then I can inject context as argument */ public function iCanInjectContextAsArgument(MyOtherContextClass $myOtherContext) { $myOtherContext->someMethod(); } //... }
Instalation
-
With composer.json
composer require yavin/behat-context-injection-extension:~1.0 -
Add extension to
behat.ymldefault: suites: example: paths: [ %paths.base%/my/features/path ] contexts: - My\Context\Namespace\MyContext - My\Context\Namespace\MyOtherContextClass extensions: Yavin\Behat\Extension\ContextInjection\ContextInjectionExtension: ~
example implementation in /tests directory
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-24