$table
$table :
A fixture attached to the non-default connection that implements the interface with none of the safe-guards from TestFixture.
create(\Cake\Datasource\ConnectionInterface $db) : boolean
Create the fixture schema/mapping/definition
\Cake\Datasource\ConnectionInterface | $db | An instance of the connection the fixture should be created on. |
True on success, false on failure.
drop(\Cake\Datasource\ConnectionInterface $db) : boolean
Run after all tests executed, should remove the table/collection from the connection.
\Cake\Datasource\ConnectionInterface | $db | An instance of the connection the fixture should be removed from. |
True on success, false on failure.
insert(\Cake\Datasource\ConnectionInterface $db) : \Cake\Database\StatementInterface|boolean
Run before each test is executed.
Should insert all the records into the test database.
\Cake\Datasource\ConnectionInterface | $db | An instance of the connection into which the records will be inserted. |
on success or if there are no records to insert, or false on failure.
createConstraints(\Cake\Datasource\ConnectionInterface $db) : boolean
Build and execute SQL queries necessary to create the constraints for the fixture
\Cake\Datasource\ConnectionInterface | $db | An instance of the database into which the constraints will be created |
on success or if there are no constraints to create, or false on failure
dropConstraints(\Cake\Datasource\ConnectionInterface $db) : boolean
Build and execute SQL queries necessary to drop the constraints for the fixture
\Cake\Datasource\ConnectionInterface | $db | An instance of the database into which the constraints will be dropped |
on success or if there are no constraints to drop, or false on failure
truncate(\Cake\Datasource\ConnectionInterface $db) : boolean
Truncates the current fixture.
\Cake\Datasource\ConnectionInterface | $db | A reference to a db instance |
Loading…