小编ahm*_*eda的帖子

Mink实例尚未在Mink上下文类上设置。您启用了Mink Extension吗?(RuntimeException)

我试图在Zend框架1上将Bek与Mink一起使用,但是当我运行Behat命令时,出现此错误“未在Mink上下文类上设置Mink实例。是否启用了Mink扩展?(RuntimeException)”

这是我的作曲家:

"behat/behat": "^3.0@dev",
"behat/mink": "1.5.*@stable",
"behat/mink-goutte-driver": "*",
"behat/mink-extension": "*"
Run Code Online (Sandbox Code Playgroud)

&这是我的behat.yml:

default:
    extensions:
        Behat\MinkExtension\Extension:
            base_url: http://en.wikipedia.org
            goutte: ~
Run Code Online (Sandbox Code Playgroud)

这是我的特色:

Feature: Search
   In order to see a word definition
   As a website user
   I need to be able to search for a word

  Scenario: Searching for a page that does exist
    Given I am on "/wiki/Main_Page"
    When I fill in "search" with "Behavior Driven Development"
    And I press "searchButton"
    Then I should see "agile software development"
Run Code Online (Sandbox Code Playgroud)

和我的FeatureContext.php:

<?php

use Behat\Behat\Context\Context;
use …
Run Code Online (Sandbox Code Playgroud)

php zend-framework behat mink

5
推荐指数
1
解决办法
2814
查看次数

标签 统计

behat ×1

mink ×1

php ×1

zend-framework ×1