lithium\test\Fixture::drop()
Drop table for this fixture.
Parameters
-
boolean
$soft
If
true
and there's no existing schema, no drop query is generated.
Returns
booleanTrue on success, false on failure
Source
public function drop($soft = true) {
$connections = $this->_classes['connections'];
$db = $connections::get($this->_connection);
if (!$db::enabled('schema')) {
return $this->truncate();
}
if ($soft && $db::enabled('sources')) {
$sources = $db->sources();
if(!in_array($this->_source, $sources)) {
return true;
}
}
return $db->dropSchema($this->_source);
}