create(TMP . 'cache/models', 0777); $TMP->create(TMP . 'cache/persistent', 0777); $TMP->create(TMP . 'cache/views', 0777); $cache = [ 'default' => [ 'engine' => 'File', ], '_cake_core_' => [ 'className' => 'File', 'prefix' => 'users_myapp_cake_core_', 'path' => CACHE . 'persistent/', 'serialize' => true, 'duration' => '+10 seconds', ], '_cake_model_' => [ 'className' => 'File', 'prefix' => 'users_app_cake_model_', 'path' => CACHE . 'models/', 'serialize' => 'File', 'duration' => '+10 seconds', ], ]; Cake\Cache\Cache::setConfig($cache); Cake\Core\Configure::write('Session', [ 'defaults' => 'php', ]); Plugin::getCollection()->add(new \CakeDC\Users\Plugin([ 'path' => dirname(dirname(__FILE__)) . DS, 'routes' => true, ])); if (file_exists($root . '/config/bootstrap.php')) { require $root . '/config/bootstrap.php'; } if (!getenv('db_dsn')) { putenv('db_dsn=sqlite:///:memory:'); } Cake\Datasource\ConnectionManager::setConfig('test', [ 'url' => getenv('db_dsn'), 'timezone' => 'UTC', ]); class_alias('TestApp\Controller\AppController', 'App\Controller\AppController'); \Cake\Core\Configure::write('App', [ 'namespace' => 'TestApp', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => 'src', 'webroot' => WEBROOT_DIR, 'wwwRoot' => WWW_ROOT, 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => [ 'plugins' => [dirname(APP) . DS . 'plugins' . DS], 'templates' => [dirname(APP) . DS . 'templates' . DS], ], ]); \Cake\Utility\Security::setSalt('yoyz186elmi66ab9pz4imbb3tgy9vnsgsfgwe2r8tyxbbfdygu9e09tlxyg8p7dq'); Plugin::getCollection()->add(new \CakeDC\Users\Plugin()); session_id('cli');