Defines the interface that testing fixtures use.
connection( )
Get the connection name this fixture should be inserted into.
string
create( Cake\Datasource\ConnectionInterface $db )
Create the fixture schema/mapping/definition
Cake\Datasource\ConnectionInterface
$db
boolean
createConstraints( Cake\Datasource\ConnectionInterface $db )
Build and execute SQL queries necessary to create the constraints for the fixture
Cake\Datasource\ConnectionInterface
$db
boolean
drop( Cake\Datasource\ConnectionInterface $db )
Run after all tests executed, should remove the table/collection from the connection.
Cake\Datasource\ConnectionInterface
$db
boolean
dropConstraints( Cake\Datasource\ConnectionInterface $db )
Build and execute SQL queries necessary to drop the constraints for the fixture
Cake\Datasource\ConnectionInterface
$db
boolean
insert( Cake\Datasource\ConnectionInterface $db )
Run before each test is executed.
Should insert all the records into the test database.
Cake\Datasource\ConnectionInterface
$db
boolean
sourceName( )
Get the table/collection name for this fixture.
string
truncate( Cake\Datasource\ConnectionInterface $db )
Truncates the current fixture.
Cake\Datasource\ConnectionInterface
$db
boolean
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/3.1/class-Cake.Datasource.FixtureInterface.html