imjoehaines/flowdception 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

imjoehaines/flowdception

最新稳定版本:v1.0.1

Composer 安装命令:

composer require --dev imjoehaines/flowdception

包简介

A Codeception Extension for Flowder

README 文档

README

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

统计信息

  • 总下载量: 180.21k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Unlicense
  • 更新时间: 2017-03-21