$connection
$connection : string
Fixture Datasource
Counter Cache Test Fixtures
$_schema : \Cake\Database\Schema\TableSchema
The schema for this fixture.
$_tableLocator : \Cake\ORM\Locator\LocatorInterface
Table locator instance
schema(\Cake\Database\Schema\TableSchema|null $schema = null) : \Cake\Database\Schema\TableSchema|null
Gets/Sets the TableSchema instance used by this fixture.
\Cake\Database\Schema\TableSchema|null | $schema | The table to set. |
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.
None found |
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.
None found |
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.
None found |
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
None found |
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
None found |
truncate(\Cake\Datasource\ConnectionInterface $db) : boolean
Truncates the current fixture.
\Cake\Datasource\ConnectionInterface | $db | A reference to a db instance |
None found |
getTableSchema() : \Cake\Database\Schema\TableSchemaInterface|null
Get and set the schema for this fixture.
None found |
setTableSchema(\Cake\Database\Schema\TableSchemaInterface $schema) : $this
Get and set the schema for this fixture.
\Cake\Database\Schema\TableSchemaInterface | $schema | The table to set. |
None found |
tableLocator(\Cake\ORM\Locator\LocatorInterface|null $tableLocator = null) : \Cake\ORM\Locator\LocatorInterface
Sets the table locator.
If no parameters are passed, it will return the currently used locator.
\Cake\ORM\Locator\LocatorInterface|null | $tableLocator | LocatorInterface instance. |
None found |
setTableLocator(\Cake\ORM\Locator\LocatorInterface $tableLocator) : $this
Sets the table locator.
\Cake\ORM\Locator\LocatorInterface | $tableLocator | LocatorInterface instance. |
None found |
getTableLocator() : \Cake\ORM\Locator\LocatorInterface
Gets the table locator.
None found |
_tableFromClass() : string
Returns the table name using the fixture class
None found |
_schemaFromFields() : void
Build the fixtures table schema from the fields property.
None found |
_schemaFromImport() : void
Build fixture schema from a table in another datasource.
when trying to import from an empty table.
None found |
_schemaFromReflection() : void
Build fixture schema directly from the datasource
when trying to reflect a table that does not exist
None found |
_getRecords() : array
Converts the internal records into data used to generate a query.
None found |