Static Public Member Functions | |
| static | loadFile ($file) |
| static | load ($json, $deserialize=true) |
| static | dump ($model, $serialize=true) |
| static | prepare ($model) |
Load a fixture file in the database: array = Pluf_Test_Fixture::load('fixturefile.json');
Dump the data of a model as a fixture string: $json = Pluf_Test_Fixture::dump('YourApp_Model'); // the full table $json = Pluf_Test_Fixture::dump($model); // one given model
| static Pluf_Test_Fixture::loadFile | ( | $ | file | ) | [static] |
| static Pluf_Test_Fixture::load | ( | $ | json, | |
| $ | deserialize = true | |||
| ) | [static] |
| static Pluf_Test_Fixture::dump | ( | $ | model, | |
| $ | serialize = true | |||
| ) | [static] |
Given a model or model name, dump the content.
If the object is given, only this single object is dumped else the complete table.
| mixed | Model object or model name | |
| bool | Serialize as JSON (true) |
| static Pluf_Test_Fixture::prepare | ( | $ | model | ) | [static] |
Return an array, ready to be serialized as json.