wohlie/behat-environment

Behat extension to provide environment specific information in a context classes.

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:behat-extension

v1.0.2 2018-10-21 14:04 UTC

This package is auto-updated.

Last update: 2024-03-22 02:41:07 UTC


README

Allows to inject the current project environment into a context. The extension currently only supports the version number.

The project environment can be extracted from the following resources:

  • package.json
    • The version will be extracted from the object key version
  • composer.json
    • The version will be extracted from the object key version
  • *.property
    • The version will be extracted from the key artifact.version

Usage

  1. Install it:

    $ composer require wohlie/behat-environment
  2. Enable this extension and configure Behat to use it:

    # behat.yml
    default:
      # ...
      extensions:
        Wohlie\Behat\Environment:
          property_file: '%paths.base%/package.json'

The parameter property_file is required.

  1. Implement the interface \Wohlie\Behat\Environment\Context\EnvAwareContext in your context class to get the environment object.