Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yaodong/php-fixtures
PHP fixtures fo testing
https://github.com/yaodong/php-fixtures
Last synced: 22 days ago
JSON representation
PHP fixtures fo testing
- Host: GitHub
- URL: https://github.com/yaodong/php-fixtures
- Owner: yaodong
- Created: 2015-07-09T04:09:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-26T14:53:40.000Z (over 9 years ago)
- Last Synced: 2024-12-20T21:15:17.292Z (about 1 month ago)
- Language: PHP
- Homepage:
- Size: 262 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PHP Fixtures
================[![Build Status](https://travis-ci.org/yaodng/php-fixtures.svg)](https://travis-ci.org/yaodng/php-fixtures)
This package is inspired by [Rails](http://guides.rubyonrails.org/testing.html).
Fixtures
--------Fixtures are a way of organizing data that you want to test against.
They are stored in YAML files, one file per model, which are placed in the directory you want.
The fixture file ends with the .yml file extension (Rails example: /test/fixtures/web_sites.yml).
The format of a fixture file looks like this:```
eric:
name: Eric Roston
email: [email protected]jane:
name: Jane Hunter
email: [email protected]
```This fixture file includes two fixtures.
Each YAML fixture (ie. record) is given a name and is followed by an indented list of key/value pairs in the "key: value" format.
Records are separated by a blank line for your viewing pleasure.
Note that fixtures are unordered.