'utf-8', 'namespace' => 'App', 'paths' => [ 'templates' => [TESTS . 'test_app' . DS . 'templates' . DS], ], 'fullBaseUrl' => 'http://localhost', ]); Configure::write('debug', true); $cache = [ 'default' => [ 'engine' => 'File', ], '_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); Security::setSalt('123'); TypeFactory::map('json', JsonType::class); class_alias(Application::class, 'App\Application'); class_alias(AppController::class, 'App\Controller\AppController'); class_alias(Table::class, 'App\Model\Table\Table'); class_alias(View::class, 'App\View\AppView'); Plugin::getCollection()->add(new CakeProductsPlugin()); // 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')); }