'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' => [APP . 'Template' . DS], 'locales' => [APP . 'Locale' . 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_dsn')) { putenv('db_dsn=sqlite:///:memory:'); } ConnectionManager::setConfig('test', ['url' => getenv('db_dsn')]); ConnectionManager::setConfig('test_custom_i18n_datasource', ['url' => getenv('db_dsn')]); Configure::write('Session', [ 'defaults' => 'php' ]); Log::setConfig([ // 'queries' => [ // 'className' => 'Console', // 'stream' => 'php://stderr', // 'scopes' => ['queriesLog'] // ], 'debug' => [ 'engine' => 'Cake\Log\Engine\FileLog', 'levels' => ['notice', 'info', 'debug'], 'file' => 'debug', ], 'error' => [ 'engine' => 'Cake\Log\Engine\FileLog', 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'], 'file' => 'error', ] ]); Chronos::setTestNow(Chronos::now()); MutableDateTime::setTestNow(MutableDateTime::now()); Date::setTestNow(Date::now()); MutableDate::setTestNow(MutableDate::now()); ini_set('intl.default_locale', 'en_US'); ini_set('session.gc_divisor', '1'); if (class_exists('PHPUnit_Runner_Version')) { class_alias('PHPUnit_Framework_TestResult', 'PHPUnit\Framework\TestResult'); class_alias('PHPUnit_Framework_Error', 'PHPUnit\Framework\Error\Error'); class_alias('PHPUnit_Framework_Error_Warning', 'PHPUnit\Framework\Error\Warning'); class_alias('PHPUnit_Framework_ExpectationFailedException', 'PHPUnit\Framework\ExpectationFailedException'); } // Fixate sessionid early on, as php7.2+ // does not allow the sessionid to be set after stdout // has been written to. session_id('cli'); // Fix multiple http/server requests in a single test method. $_SERVER['PHP_SELF'] = '/';