I've been trying to install behat & drupal extension 3 on vagrant. I keep getting this error when attempting to initialize behat:
PHP Warning: array_map(): An error occurred while invoking the map callback in /home/vagrant/vendor/symfony/dependency-injection/ContainerBuilder.php on line 1015
PHP Warning: array_map(): An error occurred while invoking the map callback in /home/vagrant/vendor/symfony/dependency-injection/ContainerBuilder.php on line 1015
PHP Warning: array_map(): An error occurred while invoking the map callback in /home/vagrant/vendor/symfony/dependency-injection/ContainerBuilder.php on line 1015
PHP Warning: array_map(): An error occurred while invoking the map callback in /home/vagrant/vendor/symfony/dependency-injection/ContainerBuilder.php on line 1015
PHP Warning: array_map(): An error occurred while invoking the map callback in /home/vagrant/vendor/symfony/dependency-injection/ContainerBuilder.php on line 1015
PHP Warning: array_map(): An error occurred while invoking the map callback in /home/vagrant/vendor/symfony/dependency-injection/ContainerBuilder.php on line 1015
[Drupal\Driver\Exception\BootstrapException]
Unable to determine Drupal core version. Supported versions are 6, 7, and 8.
Here is my composer file:
{
"require": {
"drupal/drupal-extension": "~3.0"
},
"config": {
"bin-dir": "bin/"
}
}
here is my behat.yml:
# behat.yml
default:
suites:
default:
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
- Drupal\DrupalExtension\Context\DrushContext
extensions:
Behat\MinkExtension:
goutte: ~
selenium2: ~
base_url: http://local.site.com
Drupal\DrupalExtension:
blackbox: ~
api_driver: "drupal"
drush:
alias: 'local'
drupal:
# Change this to the absolute path to Drupal install.
drupal_root: '/drupal/sites/localsite'
I've never worked with behat before so Im new at this, and I've followed the documentation on http://behat-drupal-extension.readthedocs.org/en/3.1/ as best I can, but I can never seem to get the drupal driver to work.
A co-worker has behat running well with the drush driver, but I have a custom module which I need to test and I need access to both drupal's and that module's function- unless I misunderstood need to use the drupal driver for this. The custom module I'm hoping to create tests for is a bit of an OG extension, I saw someone post helpful custom OG steps (http://www.grasmash.com/article/behat-steps-organic-groups) and I'm trying to accomplish something similar with my tests.
Am I doing anything wrong with the setup to use the drupal driver?
Comments
Comment #2
Poindexterous CreditAttribution: Poindexterous commentedComment #3
Poindexterous CreditAttribution: Poindexterous commentedFound it, I had the wrong path for the drupal root.
Comment #4
Poindexterous CreditAttribution: Poindexterous commentedComment #5
alice-0-kim CreditAttribution: alice-0-kim commentedHi,
I know it's been 2 years since this issue has been closed, but how was your path to drupal look like? Does it have to point to your drupal-version-number directory? I'm using Acquia Dev Desktop, so all the examples from the internet do not seem to match with the path in my local environment.
Any help would be appreciated. Thank you for reading!
Comment #6
jhedstromThis should be set to the absolute path that Drupal is installed at on the Acquia Dev machine: