\Pluf\TestFixture

The fixture class is used to prepopulate your database with data.

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'); $json = \Pluf\Test\Fixture::dump($model);

Summary

Methods
Properties
Constants
loadFile()
load()
dump()
prepare()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

loadFile()

loadFile(  $file) 

Parameters

$file

load()

load(  $json,   $deserialize = true) 

Parameters

$json
$deserialize

dump()

dump(  $model,   $serialize = true) : mixed

Given a model or model name, dump the content.

If the object is given, only this single object is dumped else the complete table.

Parameters

$model
$serialize

Returns

mixed —

Array or JSON string

prepare()

prepare(  $model) 

Return an array, ready to be serialized as json.

Parameters

$model