behat / environment-loader
Environment processor and contexts autoloader
Installs: 126 535
Dependents: 5
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=5.5
- behat/behat: >=3.0.6
Requires (Dev)
- phpunit/phpunit: 4 - 5
This package is auto-updated.
Last update: 2024-12-10 21:46:12 UTC
README
This tool - is a Behat library for auto loading context classes of extension to context environment.
Usage
See examples here:
namespace Behat\ExampleExtension\ServiceContainer; // ... class ExampleExtension implements Extension { // ... /** * {@inheritdoc} */ public function load(ContainerBuilder $container, array $config) { // Load all context classes from "Behat\ExampleExtension\Context\*" namespace. $loader = new EnvironmentLoader($this, $container, $config); // Your own environment reader can be easily added. // $loader->addEnvironmentReader(); $loader->load(); } // ... }
Here is a good "how to" about extension creation and usage of this library.