gabyquiles / doctrine-context
Behat Context to allow create and drop a DB schema before each Scenario
dev-master
2019-02-16 18:45 UTC
Requires
- php: >=7.0
- behat/behat: ^3.5
- behatch/contexts: ^3.0
- doctrine/orm: ^2.4.5
This package is auto-updated.
Last update: 2025-02-17 10:41:11 UTC
README
#Behat Doctrine Context This package tries to help when testing with doctrine. Its main goal is to drop and recreate a database based on Doctrine Metadata while testing with Behat.
Configuration
In order to enable it in behat you need to have a similar behat.yml
default:
suites:
default:
contexts:
...
- GabyQuiles\Behat\Context\DoctrineContext:
entityManager: '@doctrine.orm.entity_manager'
Usage
When creating your Behat scenarios
- Add
@createSchema
in your first scenario in order to create a new database - Add
@dropSchema
in your last scenario in order to drop your database