class BehatFixtureFactory extends FixtureFactory

Methods

define(String $name, array|FixtureBlueprint $defaults = array())

No description

createObject(String $name, String $identifier, Array $data = null)

Writes the fixture into the database using DataObjects

Int
createRaw(String $table, String $identifier, Array $data)

Writes the fixture into the database directly using a database manipulation.

getId($class, $identifier)

Get the ID of an object from the fixture.

A
getIds($class)

Return all of the IDs in the fixture of a particular class name.

setId(String $class, String $identifier, Int $databaseId)

No description

get($class, $identifier)

Get an object from the fixture.

Array
getFixtures()

No description

clear($limitToClass = null)

Remove all fixtures previously defined through {@link createObject()} or {@link createRaw()}, both from the internal fixture mapping and the database.

Array
getBlueprints()

No description

getBlueprint(String $name)

No description

Details

in FixtureFactory at line 44
define(String $name, array|FixtureBlueprint $defaults = array())

Parameters

String $name Unique name for this blueprint
array|FixtureBlueprint $defaults Array of default values, or a blueprint instance

at line 7
DataObject createObject(String $name, String $identifier, Array $data = null)

Writes the fixture into the database using DataObjects

Parameters

String $name Name of the {@link FixtureBlueprint} to use, usually a DataObject subclass.
String $identifier Unique identifier for this fixture type
Array $data Map of properties. Overrides default data.

Return Value

DataObject

in FixtureFactory at line 91
Int createRaw(String $table, String $identifier, Array $data)

Writes the fixture into the database directly using a database manipulation.

Does not use blueprints. Only supports tables with a primary key.

Parameters

String $table Existing database table name
String $identifier Unique identifier for this fixture type
Array $data Map of properties

Return Value

Int Database identifier

in FixtureFactory at line 109
getId($class, $identifier)

Get the ID of an object from the fixture.

Parameters

$class
$identifier

in FixtureFactory at line 122
A getIds($class)

Return all of the IDs in the fixture of a particular class name.

Parameters

$class

Return Value

A map of fixture-identifier => object-id

in FixtureFactory at line 135
setId(String $class, String $identifier, Int $databaseId)

Parameters

String $class
String $identifier
Int $databaseId

in FixtureFactory at line 146
get($class, $identifier)

Get an object from the fixture.

Parameters

$class The data class, as specified in your fixture file. Parent classes won't work
$identifier The identifier string, as provided in your fixture file

in FixtureFactory at line 155
Array getFixtures()

Return Value

Array Map of class names, containing a map of in-memory identifiers mapped to database identifiers.

in FixtureFactory at line 166
clear($limitToClass = null)

Remove all fixtures previously defined through {@link createObject()} or {@link createRaw()}, both from the internal fixture mapping and the database.

If the $class argument is set, limit clearing to items of this class.

Parameters

$limitToClass

in FixtureFactory at line 189
Array getBlueprints()

Return Value

Array Of {@link FixtureBlueprint} instances

in FixtureFactory at line 197
FixtureBlueprint getBlueprint(String $name)

Parameters

String $name

Return Value

FixtureBlueprint