nubeiro / entity-manager-aware-context
Doctrine aware contexts for Behat
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 160
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 0
Type:behat-extension
Requires
- php: ^5.6
- behat/behat: 3.*@stable
- doctrine/dbal: @stable
- doctrine/orm: @stable
- symfony/config: @stable
- symfony/dependency-injection: @stable
- symfony/doctrine-bridge: @stable
Requires (Dev)
- phpunit/phpunit: 4.8.*
This package is not auto-updated.
Last update: 2024-10-30 19:19:47 UTC
README
This Behat extension provides a context with a registry of doctrine entity managers, so that you can access doctrine's entity managers by name from other contexts.
Setup
To use it, you need to add it to your behat.yml file:
extensions: Nubeiro\EntityManagerAwareContext\Extension: dbal: connections: pbiz_users: driver: pdo_mysql host: localhost dbname: blog user: blog_user password: blog_pass pbiz_datas: driver: pdo_mysql host: localhost dbname: statistics user: statistics_user password: statistics_pass orm: entity_managers: blog: connection: blog_user mappings: [path1, path2] statistics: connection: statistics mappings: [path3, path4]
##Usage
Currently, the extension works only with YML mappings for doctrine.
You can setup your suite to use also the EntityManagerContext:
default: path: %paths.base%/features contexts: [Nubeiro\EntityManagerAwareContext\Context\EntityManagerContext]
An then, you can use Context communication to access entity manager context from your feature context.