lithium\test\fixtures\adapter\Connection::_create()
Build fixtures
Parameters
-
mixed
$namesAn array of fixture name.
-
boolean
$dropIf
truedrop the fixture before creating it -
boolean
$saveIf
truesave fixture's records in the database
Source
protected function _create($names = [], $drop = true, $save = true) {
$names = $names ?: array_keys($this->_fixtures);
foreach ((array) $names as $name) {
if (isset($this->_loaded[$name]) || $this->_instantiate($name)) {
$fixture = $this->_loaded[$name];
if ($save) {
$fixture->save($drop);
} else {
$fixture->create($drop);
}
}
}
}