wohlie / behat-environment
Behat extension to provide environment specific information in a context classes.
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:behat-extension
pkg:composer/wohlie/behat-environment
Requires
- behat/behat: ^3.0
- pascalc/php-properties: ^1.0
Requires (Dev)
This package is auto-updated.
Last update: 2025-10-22 05:48:34 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
 
- The version will be extracted from the object key 
- composer.json- The version will be extracted from the object key version
 
- The version will be extracted from the object key 
- *.property- The version will be extracted from the key artifact.version
 
- The version will be extracted from the key 
Usage
- 
Install it: $ composer require wohlie/behat-environment 
- 
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.
- Implement the interface \Wohlie\Behat\Environment\Context\EnvAwareContextin your context class to get the environment object.