Fr3nch13/CakePHP Utilities

FixtureInterface

Defines the interface that testing fixtures use.

Table of Contents

Methods

connection()  : string
Get the connection name this fixture should be inserted into.
create()  : bool
Create the fixture schema/mapping/definition
drop()  : bool
Run after all tests executed, should remove the table/collection from the connection.
insert()  : StatementInterface|bool
Run before each test is executed.
sourceName()  : string
Get the table/collection name for this fixture.
truncate()  : bool
Truncates the current fixture.

Methods

connection()

Get the connection name this fixture should be inserted into.

public connection() : string
Return values
string

create()

Create the fixture schema/mapping/definition

public create(ConnectionInterface $connection) : bool
Parameters
$connection : ConnectionInterface

An instance of the connection the fixture should be created on.

Return values
bool

True on success, false on failure.

drop()

Run after all tests executed, should remove the table/collection from the connection.

public drop(ConnectionInterface $connection) : bool
Parameters
$connection : ConnectionInterface

An instance of the connection the fixture should be removed from.

Return values
bool

True on success, false on failure.

sourceName()

Get the table/collection name for this fixture.

public sourceName() : string
Return values
string

        
On this page

Search results