CakeTestFixture is responsible for building and destroying tables to be used during testing.
__construct( )
Instantiate the fixture.
CakeException
create( DboSource $db )
Run before all tests execute, should return SQL statement to create table for this fixture could be executed successfully.
DboSource
$db
boolean
drop( DboSource $db )
Run after all tests executed, should return SQL statement to drop table for this fixture.
DboSource
$db
boolean
init( )
Initialize the fixture.
MissingModelException
insert( DboSource $db )
Run before each tests is executed, should return a set of SQL statements to insert records for the table of this fixture could be executed successfully.
DboSource
$db
boolean
CakeException
truncate( DboSource $db )
Truncates the current fixture. Can be overwritten by classes extending CakeFixture to trigger other events before / after truncate.
DboSource
$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/2.7/class-CakeTestFixture.html