Interface FixtureInterface
Defines the interface that testing fixtures use.
Namespace: Cake\Datasource
Method Summary
-
connection() public
Get the connection name this fixture should be inserted into.
-
insert() public
Run before each test is executed.
-
sourceName() public
Get the table/collection name for this fixture.
-
truncate() public
Truncates the current fixture.
Method Detail
connection() ¶ public
connection(): string
Get the connection name this fixture should be inserted into.
Returns
string
insert() ¶ public
insert(Cake\Datasource\ConnectionInterface $connection): bool
Run before each test is executed.
Should insert all the records into the test database.
Parameters
-
Cake\Datasource\ConnectionInterface
$connection An instance of the connection into which the records will be inserted.
Returns
bool
sourceName() ¶ public
sourceName(): string
Get the table/collection name for this fixture.
Returns
string
truncate() ¶ public
truncate(Cake\Datasource\ConnectionInterface $connection): bool
Truncates the current fixture.
Parameters
-
Cake\Datasource\ConnectionInterface
$connection A reference to a db instance
Returns
bool