2017 © Pedro Peláez
 

library flowdception

A Codeception Extension for Flowder

image

imjoehaines/flowdception

A Codeception Extension for Flowder

  • Wednesday, February 14, 2018
  • by imjoehaines
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10,569 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 19 % Grown

The README.md

Flowdception Latest Stable Version Build Status codecov

Flowdception is a Codeception Extension for integrating the Flowder fixture loader into Codeception test suites., (*1)

Usage

  1. Install Flowdception as a development dependency through Composer, (*2)

    $ 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), (*3)

    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 for more information)., (*4)

    A simple SQLite example might look like this:, (*5)

    <?php
    
    require __DIR__ . '/../vendor/autoload.php';
    
    use Imjoehaines\Flowder\Codeception\Flowdception;
    
    use Imjoehaines\Flowder\Loader\PhpFileLoader;
    use Imjoehaines\Flowder\Truncator\SqliteTruncator;
    use Imjoehaines\Flowder\Persister\SqlitePersister;
    
    $db = new PDO(...);
    $db->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, (*6)

The Versions

14/02 2018

dev-master

9999999-dev https://github.com/imjoehaines/flowdception

A Codeception Extension for Flowder

  Sources   Download

Unlicense The UNLICENSE

The Requires

 

The Development Requires

testing fixtures codeception fixture-loading flowder

04/05 2017

v1.0.0

1.0.0.0 https://github.com/imjoehaines/flowdception

A Codeception Extension for Flowder

  Sources   Download

The UNLICENSE

The Requires

 

The Development Requires

testing fixtures codeception fixture-loading flowder