I have an existing Drupal 8 project which I think meets the requirements in the setup documentation: I have the current version of drupal/drupal-extension installed with composer.
In the root folder of the project, I've created a behat.yml file as explained in the docs.
But when I do vendor/bin/behat --init I get this error:
In ExtensionManager.php line 194:
`Drupal\MinkExtension` extension file or class could not be located.
Comments
Comment #2
danwallace101 commentedI am getting exactly the same error. I have been trying to use behat on an existing site and have been getting different errors, so I though I'd first off get it working on a fresh installation of Drupal. In this fresh installation I am getting exactly the error you are describing.. Haven't yet worked out the issue though..
Sorry, just re-read, I'm not getting exactly the same error. I am seeing this:
Comment #3
jhedstromCan you post your
behat.ymlconfig?Comment #4
joachim commentedMy behat file is currnetly:
Prior to that I had it looking like the example in https://behat-drupal-extension.readthedocs.io/en/3.1/localinstall.html
Comment #5
jhedstromAh, I think the docs are out of sync with the 3.x branch. If you use the 4.x branch (in beta), this should work out I think.
Comment #6
joachim commentedI'm tied to version 3 by Acquia Lightning's composer requirements:
(I expect there is a way I could hack that, but I don't want to go down a rabbithole of fighting with Composer.)
Are there docs for the 3.x branch anywhere? There seems to be very little information in general on using Behat with Drupal -- I've only found 2 or 3 blog posts, for instance.
Comment #7
jhedstromIt's weird they have that in
requirerather thanrequire-dev. There are 3.x docs here: https://behat-drupal-extension.readthedocs.io/en/3.1/Comment #8
brooke_heaton commentedRunning into the same errors. I logged an issue on blt-require-dev. I'm not using lightening. Would love to not use BLT. But I do.
Comment #9
shwetaneelsharma commentedhttps://www.drupal.org/project/drupalextension/issues/3067930#comment-13...
Jhedstrom, I am using the Drupa Extension 4.x beta branch and still facing this issue.
Comment #10
shwetaneelsharma commentedI got this working by using the latest versions available for all Behat related dependencies.
Comment #11
samiullah commentedI also faced same issue:
Fix:
1. Create composer.json file
2. Run composer require "drupal/drupal-extension"
3. Run bin/behat --init command
If u have older version installed use composer remove command to remove that version
Comment #12
alex.skrypnykThis should be resolved in the latest version.
https://github.com/jhedstrom/drupalextension/releases/tag/v5.2.0
Please re-open in GitHub.