Git Product home page Git Product logo

drupal-behat's Introduction

Behat Drupal Extension

Build Status Scrutinizer Code Quality Latest Stable Version Latest Unstable Version Total Downloads License

Nuvole's Behat Drupal Extension extends the popular Behat Drupal Extension 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.

Installation and setup

Install Nuvole's Behat Drupal Extension with Composer by running:

$ composer require nuvoleweb/drupal-behat

Setup the extension by following the 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:

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.