'TestApp', 'encoding' => 'UTF-8', 'fullBaseUrl' => '//localhost', 'paths' => [ 'templates' => [ TESTS . 'templates' . DS, ], ], ]); Configure::write('debug', true); Configure::write('Config', [ 'adminEmail' => 'test@example.com', 'adminName' => 'Mark', ]); Mailer::setConfig('default', ['transport' => 'Debug']); TransportFactory::setConfig('Debug', [ 'className' => 'Debug', ]); mb_internal_encoding('UTF-8'); $Tmp = new Folder(TMP); $Tmp->create(TMP . 'cache/models', 0770); $Tmp->create(TMP . 'cache/persistent', 0770); $Tmp->create(TMP . 'cache/views', 0770); $cache = [ 'default' => [ 'engine' => 'File', 'path' => CACHE, ], '_cake_core_' => [ 'className' => 'File', 'prefix' => 'crud_myapp_cake_core_', 'path' => CACHE . 'persistent/', 'serialize' => true, 'duration' => '+10 seconds', ], '_cake_model_' => [ 'className' => 'File', 'prefix' => 'crud_my_app_cake_model_', 'path' => CACHE . 'models/', 'serialize' => 'File', 'duration' => '+10 seconds', ], ]; Cache::setConfig($cache); Log::setConfig('debug', [ 'className' => 'Cake\Log\Engine\FileLog', 'path' => LOGS, 'file' => 'debug', 'scopes' => null, 'levels' => ['notice', 'info', 'debug'], 'url' => env('LOG_DEBUG_URL', null), ]); Log::setConfig('error', [ 'className' => 'Cake\Log\Engine\FileLog', 'path' => LOGS, 'file' => 'error', 'scopes' => null, 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'], 'url' => env('LOG_ERROR_URL', null), ]); Security::setSalt('foo'); // Why is this required? require ROOT . DS . 'config' . DS . 'bootstrap.php'; Router::defaultRouteClass(DashedRoute::class); class_alias(AppController::class, 'App\Controller\AppController'); Plugin::getCollection()->add(new ToolsPlugin()); // Ensure default test connection is defined if (!getenv('DB_URL')) { putenv('DB_URL=sqlite:///:memory:'); } ConnectionManager::setConfig('test', [ 'url' => getenv('DB_URL') ?: null, 'timezone' => 'UTC', 'quoteIdentifiers' => true, 'cacheMetadata' => true, ]); if (env('FIXTURE_SCHEMA_METADATA')) { $loader = new SchemaLoader(); $loader->loadInternalFile(env('FIXTURE_SCHEMA_METADATA')); }