Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nuvoleweb/drupal-behat
Nuvole's Behat Drupal Extension.
https://github.com/nuvoleweb/drupal-behat
Last synced: 6 days ago
JSON representation
Nuvole's Behat Drupal Extension.
- Host: GitHub
- URL: https://github.com/nuvoleweb/drupal-behat
- Owner: nuvoleweb
- License: gpl-2.0
- Created: 2015-10-23T08:58:45.000Z (about 9 years ago)
- Default Branch: 1.x
- Last Pushed: 2023-11-09T15:20:42.000Z (about 1 year ago)
- Last Synced: 2024-11-07T17:59:18.346Z (13 days ago)
- Language: PHP
- Homepage:
- Size: 349 KB
- Stars: 33
- Watchers: 9
- Forks: 24
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Behat Drupal Extension
[![Build Status](https://travis-ci.org/nuvoleweb/drupal-behat.svg?branch=1.0.x)](https://travis-ci.org/nuvoleweb/drupal-behat)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nuvoleweb/drupal-behat/badges/quality-score.png?b=1.0.x)](https://scrutinizer-ci.com/g/nuvoleweb/drupal-behat/?branch=1.0.x)
[![Latest Stable Version](https://poser.pugx.org/nuvoleweb/drupal-behat/v/stable)](https://packagist.org/packages/nuvoleweb/drupal-behat)
[![Latest Unstable Version](https://poser.pugx.org/nuvoleweb/drupal-behat/v/unstable)](https://packagist.org/packages/nuvoleweb/drupal-behat)
[![Total Downloads](https://poser.pugx.org/nuvoleweb/drupal-behat/downloads)](https://packagist.org/packages/nuvoleweb/drupal-behat)
[![License](https://poser.pugx.org/nuvoleweb/drupal-behat/license)](https://packagist.org/packages/nuvoleweb/drupal-behat)Nuvole's Behat Drupal Extension extends the popular [Behat Drupal Extension](https://www.drupal.org/project/drupalextension)
in order to provide the following features:- Additional step definitions covering contributed modules, core functionality and popular third-party plugins.
- Contexts can access the global Behat service container.
- Developers can organize their test using dependency injection by declaring their services in a YAML file and/or
override default Behat services.
- Developers can override Drupal driver core classes and allow their step definitions to run transparently on different
Drupal core versions.For more information please check the [documentation](https://github.com/nuvoleweb/drupal-behat/wiki/Documentation).
## Installation and setup
Install Nuvole's Behat Drupal Extension with [Composer](https://getcomposer.org/) by running:```bash
$ composer require nuvoleweb/drupal-behat
```Setup the extension by following the [Quick start](https://github.com/jhedstrom/drupalextension#quick-start) section
available on the original Behat Drupal Extension page, just use `NuvoleWeb\Drupal\DrupalExtension` instead of the native
`Drupal\DrupalExtension` in your `behat.yml` as shown below:```yaml
default:
suites:
default:
contexts:
- Drupal\DrupalExtension\Context\DrupalContext
- NuvoleWeb\Drupal\DrupalExtension\Context\DrupalContext
...
extensions:
Behat\MinkExtension:
goutte: ~
...
# Use "NuvoleWeb\Drupal\DrupalExtension" instead of "Drupal\DrupalExtension".
NuvoleWeb\Drupal\DrupalExtension:
api_driver: "drupal"
...
services: "tests/my_services.yml"
text:
node_submit_label: "Save and publish"
```## Extension settings
Nuvole's Behat Drupal Extension accepts all parameters of the original Behat Drupal Extension and it provides the
following additional ones:| Parameter | Description |
|-----------|-------------|
| `services: "tests/my_services.yml"` | Path to your custom service definition YAML file. |
| `text.node_submit_label: "Save and publish"` | Label of node form submit button (different in Drupal 7/6 and Drupal 8). |## Additional resources
* [Behat Drupal Extension documentation](https://behat-drupal-extension.readthedocs.org)
* [Behat documentation](http://docs.behat.org)
* [Mink documentation](http://mink.behat.org)
* [Drupal Behat group](http://groups.drupal.org/behat)