zorbus / behat-contexts
Contexts for functional testing with behat
Installs: 4 996
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- doctrine/data-fixtures: ~1.0
- doctrine/migrations: ~1.0
- doctrine/orm: ~2.4
Requires (Dev)
- behat/behat: ~3.0
This package is not auto-updated.
Last update: 2024-12-21 17:08:59 UTC
README
Contexts for Behat 3.
At the moment, just a Doctrine 2 context is included.
Instalation
composer require zorbus/behat-contexts
Example
Check the FeatureContext.php for an example on how to instantiate the database context.
In case you are using the Symfony2 extension, you can pass the services defined in the container, no need to create the connection and entity manager manually.
Check database.feature for a real example of the defined steps.
Usage
Tag your scenarios with @database to make clean the database.
Test
In the root of the package, run:
touch data/db.sqlite php vendor/bin/behat --suite=sqlite