Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

imjoehaines/flowdception

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flowdception Latest Stable Version Build Status codecov

Flowdception is a Codeception Extension for integrating the Flowder fixture loader into Codeception test suites.

Usage

  1. Install Flowdception as a development dependency through Composer

    $ 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)

    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).

    A simple SQLite example might look like this:

    <?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

About

A Codeception Extension for Flowder

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.