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