'App', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => APP_DIR, 'webroot' => 'webroot', 'wwwRoot' => WWW_ROOT, 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => [ 'plugins' => [TEST_APP . 'Plugin' . DS], 'templates' => [TEST_APP . 'templates' . DS], 'locales' => [TEST_APP . 'resources' . DS . 'locales' . DS], ], ]); Cache::setConfig([ '_cake_core_' => [ 'engine' => 'File', 'prefix' => 'cake_core_', 'serialize' => true, ], '_cake_model_' => [ 'engine' => 'File', 'prefix' => 'cake_model_', 'serialize' => true, ], ]); // Ensure default test connection is defined if (!getenv('DB_URL')) { putenv('DB_URL=sqlite:///:memory:'); } ConnectionManager::setConfig('test', ['url' => getenv('DB_URL')]); if (env('CAKE_TEST_AUTOQUOTE')) { ConnectionManager::get('test')->getDriver()->enableAutoQuoting(true); } Configure::write('Session', [ 'defaults' => 'php', ]); Configure::write('Debugger.exportFormatter', TextFormatter::class); Log::setConfig([ 'debug' => [ 'engine' => 'Cake\Log\Engine\FileLog', 'levels' => ['notice', 'info', 'debug'], 'file' => 'debug', 'path' => LOGS, ], 'error' => [ 'engine' => 'Cake\Log\Engine\FileLog', 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'], 'file' => 'error', 'path' => LOGS, ], ]); Chronos::setTestNow(Chronos::now()); Security::setSalt('a-long-but-not-random-value'); ini_set('intl.default_locale', 'en_US'); ini_set('session.gc_divisor', '1'); // Fixate sessionid early on, as php7.2+ // does not allow the sessionid to be set after stdout // has been written to. session_id('cli'); // Create test database schema if (env('FIXTURE_SCHEMA_METADATA')) { $loader = new SchemaLoader(); $loader->loadInternalFile(env('FIXTURE_SCHEMA_METADATA')); }