https://github.com/imjoehaines/flowder-json-loader
A JSON file loader for Flowder
https://github.com/imjoehaines/flowder-json-loader
fixture-loading fixtures flowder json testing
Last synced: about 1 month ago
JSON representation
A JSON file loader for Flowder
- Host: GitHub
- URL: https://github.com/imjoehaines/flowder-json-loader
- Owner: imjoehaines
- License: unlicense
- Created: 2017-04-07T19:49:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-14T11:45:10.000Z (over 8 years ago)
- Last Synced: 2026-02-01T14:46:04.037Z (4 months ago)
- Topics: fixture-loading, fixtures, flowder, json, testing
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flowder JSON Loader [](https://packagist.org/packages/imjoehaines/flowder-json-loader) [](https://travis-ci.org/imjoehaines/flowder-json-loader) [](https://codecov.io/gh/imjoehaines/flowder-json-loader)
A JSON file loader for [Flowder](https://github.com/imjoehaines/flowder)
## Usage
1. Install Flowder JSON Loader as a development dependency through [Composer](https://getcomposer.org/)
```sh
$ composer install imjoehaines/flowder-json-loader --dev
```
2. Pass an instance of `Imjoehaines\FlowderJson\JsonLoader` to Flowder, as detailed in the [Flowder readme](https://github.com/imjoehaines/flowder/blob/master/README.md#usage)
3. Pass the path to a JSON file to `Flowder::loadFixtures`, your JSON file should contain an array of objects where each object represents a database row. For example
```json
[
{
"column_1": "value 1",
"column_2": 2,
"column_3": "three"
},
{
"column_1": "value 4",
"column_2": 5,
"column_3": "six"
}
]
```