https://github.com/imjoehaines/flowdception
A Codeception Extension for Flowder
https://github.com/imjoehaines/flowdception
codeception fixture-loading fixtures flowder testing
Last synced: 27 days ago
JSON representation
A Codeception Extension for Flowder
- Host: GitHub
- URL: https://github.com/imjoehaines/flowdception
- Owner: imjoehaines
- License: unlicense
- Created: 2017-03-20T22:30:40.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-01-26T10:39:16.000Z (about 1 year ago)
- Last Synced: 2025-03-24T03:36:34.868Z (28 days ago)
- Topics: codeception, fixture-loading, fixtures, flowder, testing
- Language: PHP
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flowdception [](https://packagist.org/packages/imjoehaines/flowdception) [](https://travis-ci.org/imjoehaines/flowdception) [](https://codecov.io/gh/imjoehaines/flowdception)
**Flowdception** is a Codeception Extension for integrating the [Flowder](https://github.com/imjoehaines/flowder) fixture loader into Codeception test suites.
## Usage
1. Install Flowdception as a development dependency through [Composer](https://getcomposer.org/)
```sh
$ composer install imjoehaines/flowdception --dev
```2. Enable Flowdception as an extension in your main `codeception.yml`, or a specific suite's YAML configuration file (e.g. `integration.suite.yml`)
```yaml
extensions:
enabled:
- \Imjoehaines\Flowder\Codeception\Flowdception
```3. Bootstrap Flowdception by calling `Flowdception::bootsrap` in one of your `_bootstrap.php` Codeception files, passing in an instance of `\Imjoehaines\Flowder\Flowder` (see the [Flowder documentation](https://github.com/imjoehaines/flowder) for more information).
A simple SQLite example might look like this:
```php
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);Flowdception::bootstrap(
__DIR__ . '/_data/example.php',
new PhpFileLoader(),
new SqliteTruncator($db),
new SqlitePersister($db)
);
```4. That's it! Before any Codeception test file runs, Flowder will load your fixture data for you