I'm testing Behat/Mink for the first time with a simple example.
When I launch behat
I have this error :
PHP Fatal error: Class 'Behat\Behat\Context\Step\Given' not found in /var/www/behat-test/features/bootstrap/FeatureContext.php on line 31
features/bootstrap/FeatureContext.php :
<?php
require_once './vendor/autoload.php';
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\MinkExtension\Context\MinkContext;
use Behat\Behat\Context\Step;
class FeatureContext extends MinkContext implements Context, SnippetAcceptingContext
{
// ......
/**
* @Given I am logged in as :username
*/
public function iAmLoggedInAs($username)
{
return array(
new Step\Given('I go to "login.php"'), // line 31
new Step\When('I fill in "My name" with '.$username),
new Step\When('I press "Login"')
);
}
}