imjoehaines / flowder-yaml-loader
A YAML file loader for flowder
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/imjoehaines/flowder-yaml-loader
Requires
- imjoehaines/flowder: dev-master
- symfony/yaml: ^3.2
Requires (Dev)
- phpunit/phpunit: ^5.0
This package is auto-updated.
Last update: 2025-09-29 01:43:59 UTC
README
A YAML file loader for Flowder
Usage
-
Install Flowder YAML Loader as a development dependency through Composer
$ composer install imjoehaines/flowder-yaml-loader --dev
-
Pass an instance of
Imjoehaines\FlowderYaml\YamlLoader
to Flowder, as detailed in the Flowder readme -
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
row_1: column_1: value 1 column_2: 2 column_3: three row_2: column_1: value 4 column_2: 5 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
- column_1: value 1 column_2: 2 column_3: three - column_1: value 4 column_2: 5 column_3: six
[ { "column_1": "value 1", "column_2": 2, "column_3": "three" }, { "column_1": "value 4", "column_2": 5, "column_3": "six" } ]