/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/Model/Table
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/Model/Table/LazyTableTrait.php (2821B)
getConnection();
$schema = $connection->getSchemaCollection();
try {
$existing = $schema->listTables();
} catch (PDOException $e) {
// Handle errors when SQLite blows up if the schema has changed.
if (strpos($e->getMessage(), 'schema has changed') !== false) {
$existing = $schema->listTables();
} else {
throw $e;
}
}
try {
foreach ($fixtures as $name) {
$class = App::className($name, 'Test/Fixture', 'Fixture');
if ($class === null) {
throw new \RuntimeException("Unknown fixture '$name'.");
}
/** @var \Cake\TestSuite\Fixture\TestFixture $fixture */
$fixture = new $class($connection->configName());
if (in_array($fixture->table, $existing)) {
continue;
}
$fixture->create($connection);
}
} catch (PDOException $e) {
if (strpos($e->getMessage(), 'unable to open')) {
throw new RuntimeException(
'Could not create a SQLite database. ' .
'Ensure that your webserver has write access to the database file and folder it is in.'
);
}
throw $e;
}
}
}