I try to run behat tests in a Laravel project.
When I run bin/php vendor/bin/behat:
I have this error:
In GoutteFactory.php line 117:
Method Goutte\Client::setClient() does not exist
My composer.json:
"require": {
"php": "^8.0.2",
[...]
"behat/mink": "^1.9",
"dmore/behat-chrome-extension": "^1.4",
"behat/mink-goutte-driver": "^2.0",
"dmore/chrome-mink-driver": "^2.8"
},
"require-dev": {
"behat/behat": "^3.10",
"friends-of-behat/mink-extension": "^2.6",
[...]
}
}
My behat.yml:
default:
extensions:
Behat\MinkExtension:
goutte: ~
Myfeature is a very simplest tests. It only uses rules provided by Mink, like "Given I am on "/".
My FeatureContext.php
use Behat\Behat\Context\Context;
use Behat\MinkExtension\Context\MinkContext;
/**
* Defines application features from the specific context.
*/
class FeatureContext extends MinkContext implements Context
{
}