在 Behat 中启用 Mink 扩展
Enabling Mink Extension in Behat
我正在尝试将 Mink 扩展添加到 Behat。我已经通过作曲家安装了 Behat、Mink 和 Mink-Extension。但是,现在我在启用扩展时遇到了问题。这是我的 behat.yml
:
default:
extensions:
Behat\MinkExtension\Extension:
base_url: http://en.wikipedia.org
goutte: ~
selenium2: ~
这是我的示例测试:
Feature: New
In order to test Behat
As a developer
I need to test that Mink Extension works
Scenario:
Given I am on the homepage
当我 运行 Behat 时,我得到这个输出:
Feature: New
In order to test Behat
As a developer
I need to test that Mink Extension works
Scenario: # features/new.feature:6
Given I am on the homepage # FeatureContext::iAmOnHomepage()
Mink instance has not been set on Mink context class. Have you enabled the Mink Extension? (RuntimeException)
--- Failed scenarios:
features/new.feature:6
1 scenario (1 failed)
1 step (1 failed)
0m0.02s (11.86Mb)
所以我搜索了 'Mink instance has not been set on Mink context class. Have you enabled the Mink Extension? (RuntimeException)' 并没有得到像样的结果。我需要做什么才能启用扩展程序?
默认配置文件和扩展名未正确对齐,请尝试根据 yml 标记对齐文档
default:
extensions:
Behat\MinkExtension\Extension:
base_url: http://en.wikipedia.org
goutte: ~
selenium2: ~
更多信息请查看behat extension docs
我正在尝试将 Mink 扩展添加到 Behat。我已经通过作曲家安装了 Behat、Mink 和 Mink-Extension。但是,现在我在启用扩展时遇到了问题。这是我的 behat.yml
:
default:
extensions:
Behat\MinkExtension\Extension:
base_url: http://en.wikipedia.org
goutte: ~
selenium2: ~
这是我的示例测试:
Feature: New
In order to test Behat
As a developer
I need to test that Mink Extension works
Scenario:
Given I am on the homepage
当我 运行 Behat 时,我得到这个输出:
Feature: New
In order to test Behat
As a developer
I need to test that Mink Extension works
Scenario: # features/new.feature:6
Given I am on the homepage # FeatureContext::iAmOnHomepage()
Mink instance has not been set on Mink context class. Have you enabled the Mink Extension? (RuntimeException)
--- Failed scenarios:
features/new.feature:6
1 scenario (1 failed)
1 step (1 failed)
0m0.02s (11.86Mb)
所以我搜索了 'Mink instance has not been set on Mink context class. Have you enabled the Mink Extension? (RuntimeException)' 并没有得到像样的结果。我需要做什么才能启用扩展程序?
默认配置文件和扩展名未正确对齐,请尝试根据 yml 标记对齐文档
default:
extensions:
Behat\MinkExtension\Extension:
base_url: http://en.wikipedia.org
goutte: ~
selenium2: ~
更多信息请查看behat extension docs