Download the PHP package mrkrstphr/dbunit-fixture-arrays without Composer
On this page you can find all versions of the php package mrkrstphr/dbunit-fixture-arrays. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mrkrstphr/dbunit-fixture-arrays
More information about mrkrstphr/dbunit-fixture-arrays
Files in mrkrstphr/dbunit-fixture-arrays
Package dbunit-fixture-arrays
Short Description PHPUnit DbUnit Native Array-based Fixtures
License MIT
Homepage http://github.com/mrkrstphr/dbunit-fixture-arrays
Informations about the package dbunit-fixture-arrays
dbunit-fixture-arrays
A native PHP array-based fixture provider for PHPUnit's DbUnit
dbunit-fixture-arrays provides the capability to provide fixtures (data sets) to PHPUnit's DbUnit as native PHP arrays, as opposed to the many other drivers currently supported by DbUnit, such as Yaml, XML, CSV, etc.
How?
Simply install with composer:
composer require mrkrstphr/dbunit-fixture-arrays:@stable
Then plug into DbUnit as you would with any other data set format:
Where the files look something like:
Why?
Sometimes it's nice to be able to slip a little logic into the fixtures files. Say for instance that you need some test data that contains a date in the future, but not more than 1 year away. Without continually updating your fixture data, there's no way to reliably do this.
With dbunit-fixture-arrays, you can:
Other benefits include slightly, but probably not very noticably, faster tests with less memory footprint due to not needing to parse Yaml or XML - your results may vary.
Contributing
Suggestions or bugs? Submit an issue or open a pull request!
All versions of dbunit-fixture-arrays with dependencies
phpunit/phpunit Version >=3.7.0@stable
phpunit/dbunit Version >=1.3.0@stable