Download the PHP package ingenerator/be_entity without Composer
On this page you can find all versions of the php package ingenerator/be_entity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ingenerator/be_entity
More information about ingenerator/be_entity
Files in ingenerator/be_entity
Package be_entity
Short Description Doctrine 2 entity factory and expectation testing helper framework for Behat
License BSD-3-Clause
Homepage http://github.com/ingenerator/be_entity
Informations about the package be_entity
Be_Entity
Improve clarity of your Behat suites by easily specifying Doctrine2 entities within your feature files instead of in separate fixtures.
Usage Example
Installation
Add to your composer.json:
Create the BeEntity context as a subcontext of your FeatureContext:
Create factory classes for each type of entity you want to use in your features - see the example User factory above. Your factory defines how to use the step argument to search for an entity of that type and declares sensible defaults for a new entity record.
Note that you can have multiple factory classes for each entity type in your application - for example, you might create an Administrator factory that creates Project\User entities with a particular field set or role granted.
Roadmap
- Generators for sequences of entities - eg user1, user2, user3
- Entity references - eg
Given the Blog entity "My first blog" has author "User: [email protected]"
- Wipe db/wipe table hooks for specific scenarios that require an empty database or integration builds
- Review Entity Manager injection and consider a service container layer
Contributors and Credits
- Andrew Coulton acoulton [lead developer]
Heavily inspired by thoughtbot's factory_girl ruby gem.
Licence
BSD Licence - see LICENSE