项目作者: imjoehaines

项目描述 :
A YAML file loader for Flowder
高级语言: PHP
项目地址: git://github.com/imjoehaines/flowder-yaml-loader.git
创建时间: 2017-04-07T20:00:44Z
项目社区:https://github.com/imjoehaines/flowder-yaml-loader

开源协议:The Unlicense

下载


Flowder YAML Loader Latest Stable Version Build Status codecov

A YAML file loader for Flowder

Usage

  1. Install Flowder YAML Loader as a development dependency through Composer

    1. $ composer install imjoehaines/flowder-yaml-loader --dev
  2. Pass an instance of Imjoehaines\FlowderYaml\YamlLoader to Flowder, as detailed in the Flowder readme

  3. Pass the path to a YAML file to Flowder::loadFixtures, your YAML file should contain an array of arrays where each “inner” array is a database row. For example

  1. row_1:
  2. column_1: value 1
  3. column_2: 2
  4. column_3: three
  5. row_2:
  6. column_1: value 4
  7. column_2: 5
  8. column_3: six

Any YAML array syntax supported by Symfony’s Yaml Component is supported, so all of the following examples will result in the exact same data as above

  1. -
  2. column_1: value 1
  3. column_2: 2
  4. column_3: three
  5. -
  6. column_1: value 4
  7. column_2: 5
  8. column_3: six
  1. [
  2. {
  3. "column_1": "value 1",
  4. "column_2": 2,
  5. "column_3": "three"
  6. },
  7. {
  8. "column_1": "value 4",
  9. "column_2": 5,
  10. "column_3": "six"
  11. }
  12. ]