Skip to content

Drupal module for Codeception. Based on the work Drupal extension for Behat (http://drupal.org/project/drupalextension)

License

GPL-2.0, GPL-2.0 licenses found

Licenses found

GPL-2.0
LICENSE
GPL-2.0
LICENSE.md
Notifications You must be signed in to change notification settings

arocom-michael/codeception-drupal

codeception-drupal

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Use Gherkin DSL steps based on Drupal 8 within Codeception. This work is mainly based on the excellent Behat Extension named drupal/drupal-extension. This module is based on Codeception 2.3 or higher.

Structure

Within the config directory, there is an example of how to configure your Codeception suite.

bin/
config/
src/
tests/
vendor/

Install

Via Composer

$ composer require arocom/codeception-drupal

Usage

Substitute <Suite> with your suite, it's normally in lower case. The working_directory key within the DrupalDrush module is the absolute path of your drupal installation.

actor: <Suite>Tester
modules:
    enabled:
        - WebDriver
        - Asserts
        - \Helper\<Suite>
        - \Codeception\Module\Context\MinkContext
        - \Codeception\Module\Context\AcceptanceContext
        - \Codeception\Module\Context\BatchContext
        - \Codeception\Module\Context\MarkupContext
        - \Codeception\Module\Context\DrushContext
        - DrupalDrush
    config:
        WebDriver:
            url: 'https://www.drupal.org'
            browser: chrome
            host: '127.0.0.1'
            port: 4444
            window_size: 1920x1080
        \Codeception\Module\Context\MinkContext:
            DI: 'WebDriver'
            PSR-7: '\GuzzleHttp\Client'
        \Codeception\Module\Context\AcceptanceContext:
            DI: 'WebDriver'
            PSR-7: '\GuzzleHttp\Client'
        \Codeception\Module\Context\BatchContext:
            DI: 'WebDriver'
            PSR-7: '\GuzzleHttp\Client'
        \Codeception\Module\Context\MarkupContext:
            DI: 'WebDriver'
            PSR-7: '\GuzzleHttp\Client'
        \Codeception\Module\Context\DrushContext:
            DI: 'WebDriver'
            PSR-7: '\GuzzleHttp\Client'
            Drush: 'DrupalDrush'
            DrushAlias: 'drush'
        DrupalDrush:
            working_directory: '/var/www/drupal' # Absolute path

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email :author_email instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Drupal module for Codeception. Based on the work Drupal extension for Behat (http://drupal.org/project/drupalextension)

Resources

License

GPL-2.0, GPL-2.0 licenses found

Licenses found

GPL-2.0
LICENSE
GPL-2.0
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages