fixtures suck

This commit is contained in:
2026-01-24 11:11:04 -08:00
parent 37b7bca3be
commit ea1cb8cd29
7 changed files with 121 additions and 67 deletions

View File

@@ -141,6 +141,7 @@ ConnectionManager::setConfig('test', [
'timezone' => 'UTC',
'quoteIdentifiers' => false,
'cacheMetadata' => true,
'log' => true,
]);
/**
@@ -156,16 +157,20 @@ ConnectionManager::setConfig('test', [
// Load a schema dump file.
//(new SchemaLoader())->loadSqlFiles('tests/schema.sql', 'test');
if (!defined('SECOND')) {
define('SECOND', 1);
define('MINUTE', 60);
define('HOUR', 3600);
define('DAY', 86400);
define('WEEK', 604800);
define('MONTH', 2592000);
define('YEAR', 31536000);
define('SECOND', 1);
define('MINUTE', 60);
define('HOUR', 3600);
define('DAY', 86400);
define('WEEK', 604800);
define('MONTH', 2592000);
define('YEAR', 31536000);
}
$migrator = new Migrator();
$migrator->run(['plugin' => 'CakeContactUs']);
$migrator->run(['plugin' => 'Captcha']);
$migrator->runMany([
// Run app migrations on test connection.
['connection' => 'test'],
// Run plugin migrations on test connection.
['plugin' => 'CakeContactUs'],
['plugin' => 'Captcha'],
]);