mdjward / behat-env-var-extension
Behat extension to make environment variables available as container parameters
Installs: 82
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/mdjward/behat-env-var-extension
Requires
- php: >=5.4.0
- behat/behat: ~3.0
Requires (Dev)
- phpunit/phpunit: 5.6.*
- symfony/filesystem: 2.*|3.*
- symfony/process: 2.*|3.*
This package is not auto-updated.
Last update: 2025-10-12 01:43:16 UTC
README
An extension to Behat to support the ingestion of environment variables into container parameters, for use in behat configuration.
Example usage
Configure the extension as follows under Behat:
extensions: Mdjward\Behat\EnvVarExtension: prefix: env
Any environment variables passed through to Behat will - as a consequence - be registered in the service container as parameters in the form:
env.environment_variable_name
...where environment_variable_name
is the lower-case form of a given environment variable. For example, a variable MY_TEST_ENV
will be registered as env.my_test_env
.
The prefix
parameter is entirely optional, and will default to 'env' if not specified.