Behat And Mink Installation In Win 7

Hello to everybody,

it’s fourth day that I’ve been struggling with installing behat and mink extension. But so far I have not succeeded. I’m asking myself if it is possible at all?

I tried PHAR installation, then COMPOSER. With no success.

My setup is:

[list=0]

[*]OS: Windows 7 Professional 64 bit

[*]Apache server 2.2.14 (win32)

[*]PHP 5.4.9

[/list]

The point is that behat and mink are apparently being installed fine, but:

[list=1]

[*]the first suspicion that comes in mind is the absence of predefined steps available in behat (no matter whether I initialize behat with


behat --init

or not).

[*] as a consequence, whatever command I use in FeatureContext.php, for example


   public function iAmOnTheHomepage()

    {

        $this->visit('/');

    }



I get




php.exe : PHP Fatal error:  Call to undefined method FeatureContext::visit() in 

xxx\protected\tests\features\bootstrap\FeatureContext.php on line 63



[/list]

It seems that behat does not find mink extension, but I can not find out how to force it to do this.

[color="#006400"]/* moved from Feature Requests */[/color]

You’ll probably have better luck getting help on the Behat/Mink homepage.

you are absolutely right… probably, it’s better to remove the topic.

Not necessarily. Because there might be some Yii users who use it and knows how to install it. So let’s just let it be, and hope that you get some help soon. ;)

Half a year later I came across my own post :-). The solution to the problem is to add the following lines to the features/bootstrap/FeatureContext.php file:


use Behat\MinkExtension\Context\MinkDictionary;

class FeatureContext extends BehatContext

{


    use MinkDictionary;

.....

}

Probably it might be useful for somebody.