class BehatFixtureFactory extends FixtureFactory

Methods

$this
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.

int
getId(string $class, string $identifier)

Get the ID of an object from the fixture.

array|false
getIds(string $class)

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

$this
setId(string $class, string $identifier, int $databaseId)

No description

get(string $class, string $identifier)

Get an object from the fixture.

array
getFixtures()

No description

clear(string $limitToClass = null, bool $metadata = false)

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 53
$this 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

Return Value

$this

at line 9
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 105
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 126
int getId(string $class, string $identifier)

Get the ID of an object from the fixture.

Parameters

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

Return Value

int

in FixtureFactory at line 141
array|false getIds(string $class)

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

Parameters

string $class The data class or table name

Return Value

array|false A map of fixture-identifier => object-id

in FixtureFactory at line 156
$this setId(string $class, string $identifier, int $databaseId)

Parameters

string $class
string $identifier
int $databaseId

Return Value

$this

in FixtureFactory at line 169
DataObject get(string $class, string $identifier)

Get an object from the fixture.

Parameters

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

Return Value

DataObject

in FixtureFactory at line 193
array getFixtures()

Return Value

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

in FixtureFactory at line 207
clear(string $limitToClass = null, bool $metadata = false)

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

string $limitToClass
bool $metadata Clear internal mapping as well as data. Set to false by default since sometimes data is rolled back by translations.

in FixtureFactory at line 236
array getBlueprints()

Return Value

array Of {@link FixtureBlueprint} instances

in FixtureFactory at line 245
FixtureBlueprint|false getBlueprint(String $name)

Parameters

String $name

Return Value

FixtureBlueprint|false