Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to activate mink in behat
    text
    copied!<p>I'm trying to use behat and mink together, reading that link:</p> <p><a href="http://docs.behat.org/cookbook/behat_and_mink.html#method-1-composer">http://docs.behat.org/cookbook/behat_and_mink.html#method-1-composer</a></p> <p>and trying to activate Mink in Behat framework, but it does not work for me :(</p> <p>here is text form manual</p> <pre><code> And this executable will already autoload all the needed classes in order to activate MinkExtension through behat.yml. Now lets activate it: </code></pre> <p>I'm thinking he is talking about <code>/vendor/behat/mink-extension/behat.yml</code> ?</p> <p>I had added these lines into that file</p> <pre><code># behat.yml default: extensions: Behat\MinkExtension\Extension: goutte: ~ selenium2: ~ </code></pre> <p>But when i'm doing <code>$bin/behat -dl</code> i can see only</p> <pre><code>Given /^I am in a directory "([^"]*)"$/ Given /^I have a file named "([^"]*)"$/ When /^I run "([^"]*)"$/ Then /^I should get:$/ </code></pre> <p>Seems mink-extension do not activated...but how i can activate it, if i did everything what is written in the manual :(</p> <p>P.S. I just tried to follow instruction (from here <a href="http://docs.behat.org/cookbook/behat_and_mink.html">http://docs.behat.org/cookbook/behat_and_mink.html</a>) in totally new clean place (new folder) but it does not work it shows me next error</p> <pre><code>bin/behat -dl [RuntimeException] Context class not found. Maybe you have provided wrong or no `bootstrap` path in your behat.yml: http://docs.behat.org/guides/7.config.html#paths </code></pre> <p>But in tutorial nothing says about paths and yml modifications :( Maybe is there exist any updated tutorial version ?</p> <p>based on error message I have to make some php file in bootstrap folder, but it was not describe in tutorial :( strange</p> <p><strong>SOLVED:</strong></p> <pre><code>$ mkdir behat_mink_test &amp;&amp; cd behat_mink_test $ touch composer.json $ echo '{ &gt; "require": { &gt; "behat/behat": "2.4.*@stable", &gt; "behat/mink": "1.4.*@stable", &gt; "behat/mink-extension": "*", &gt; "behat/mink-goutte-driver": "*", &gt; "behat/mink-selenium2-driver": "*" &gt; }, &gt; "minimum-stability": "dev", &gt; "config": { &gt; "bin-dir": "bin/" &gt; } &gt; }' &gt; composer.json $ curl http://getcomposer.org/installer | php $ php composer.phar install $ bin/behat -h $ touch behat.yml $ echo 'default: &gt; extensions: &gt; Behat\MinkExtension\Extension: &gt; goutte: ~ &gt; selenium2: ~' &gt; behat.yml $ bin/behat -dl </code></pre> <p>and finally it works now :) thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload