Defines the interface that testing fixtures use.
Build and execute SQL queries necessary to create the constraints for the fixture
Build and execute SQL queries necessary to drop the constraints for the fixture
connection( )
Get the connection name this fixture should be inserted into.
create( Cake\Datasource\ConnectionInterface $db )
Create the fixture schema/mapping/definition
Cake\Datasource\ConnectionInterface
$db
createConstraints( Cake\Datasource\ConnectionInterface $db )
Build and execute SQL queries necessary to create the constraints for the fixture
Cake\Datasource\ConnectionInterface
$db
drop( Cake\Datasource\ConnectionInterface $db )
Run after all tests executed, should remove the table/collection from the connection.
Cake\Datasource\ConnectionInterface
$db
dropConstraints( Cake\Datasource\ConnectionInterface $db )
Build and execute SQL queries necessary to drop the constraints for the fixture
Cake\Datasource\ConnectionInterface
$db
insert( Cake\Datasource\ConnectionInterface $db )
Run before each test is executed.
Should insert all the records into the test database.
Cake\Datasource\ConnectionInterface
$db
sourceName( )
Get the table/collection name for this fixture.
truncate( Cake\Datasource\ConnectionInterface $db )
Truncates the current fixture.
Cake\Datasource\ConnectionInterface
$db
© 2005–2017 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.
https://api.cakephp.org/3.4/class-Cake.Datasource.FixtureInterface.html