Download the PHP package linkorb/transmogrifierextension without Composer
On this page you can find all versions of the php package linkorb/transmogrifierextension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download linkorb/transmogrifierextension
More information about linkorb/transmogrifierextension
Files in linkorb/transmogrifierextension
Package transmogrifierextension
Short Description Behat Extension for the Transmogrifier database fixture library
License MIT
Homepage http://www.github.com/linkorb/transmogrifierextension
Informations about the package transmogrifierextension
Transmogrifier Behat Extension
Transmogrifier is a tool to help setup your database fixtures before running your tests.
This is repository contains the Transmogrifier Extension for Behat.
This allows you to use Transmogrifier directly from your Behat .feature
files!
Adding the extension will activate a few new Gherkin commands to help you initialize your database testing fixtures.
Installing the extension through composer
Open your composer.json
file, and add this to the require
section:
Enabling the Behat extension
Edit your features/bootstrap/FeatureContext.php
file, and add the following line to the __construct
method:
How to use the extension in your .feature files
You can use the following new syntax in your .feature
files:
This example scenario will tell Behat to connect to the database test
, load dataset user.yml
, and apply it.
After that it will verify the user
table contains 2 records (just like the yml file).
Configuring the extension in behat.yml
For this to work, you will need to tell Behat and Transmogrifier where to find your datasets, and where to find your database config files.
Edit your behat.yml
file, and add the following:
These paths can be either absolute or relative from the directory where you start Behat.
Behat example
The features/
directory in this repository contains a fully functional transmogrifier.feature
file.
More info?
Check the Transmogrifier repo for more information: http://www.github.com/linkorb/transmogrifier/
Brought to you by the LinkORB Engineering team
Check out our other projects at linkorb.com/engineering.
Btw, we're hiring!