} define('ROOT', dirname(__DIR__)); define('APP_DIR', 'src'); define('TMP', sys_get_temp_dir() . DS); define('LOGS', TMP . 'logs' . DS); define('CACHE', TMP . 'cache' . DS); define('SESSIONS', TMP . 'sessions' . DS); define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'vendor' . DS . 'cakephp' . DS . 'cakephp'); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); define('CAKE', CORE_PATH . 'src' . DS); define('TEST_APP', ROOT . DS . 'tests' . DS . 'test_app' . DS); // Point app constants to the test app. define('APP', TEST_APP . APP_DIR . DS); define('WWW_ROOT', TEST_APP . 'webroot' . DS); define('CONFIG', TEST_APP . 'config' . DS); $loader = new \Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('App', APP); //@codingStandardsIgnoreStart @mkdir(LOGS); @mkdir(SESSIONS); @mkdir(CACHE); @mkdir(CACHE . 'views'); @mkdir(CACHE . 'models'); //@codingStandardsIgnoreEnd require_once CORE_PATH . 'config/bootstrap.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); Configure::write('debug', true); Configure::write('App', ['namespace' => '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::config(['_cake_core_' => ['engine' => 'File', 'prefix' => 'cake_core_', 'serialize' => true], '_cake_model_' => ['engine' => 'File', 'prefix' => 'cake_model_', 'serialize' => true]]);
require_once 'vendor/autoload.php'; // Path constants to a few helpful things. define('ROOT', dirname(__DIR__) . DS); define('CAKE_CORE_INCLUDE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp'); define('CORE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp' . DS); define('CAKE', CORE_PATH . 'src' . DS); define('TESTS', ROOT . 'tests'); define('APP', ROOT . 'tests' . DS . 'test_app' . DS); define('APP_DIR', 'test_app'); define('WEBROOT_DIR', 'webroot'); define('WWW_ROOT', APP . 'webroot' . DS); define('TMP', sys_get_temp_dir() . DS); define('CONFIG', APP . 'config' . DS); define('CACHE', TMP); define('LOGS', TMP); $loader = new \Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('TestApp', APP); $loader->addNamespace('DebugHttpTestPlugin', APP . 'Plugin' . DS . 'TestPlugin' . DS . 'src'); require_once CORE_PATH . 'config/bootstrap.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); Configure::write('debug', true); Configure::write('App', ['namespace' => 'App', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => 'src', 'webroot' => 'webroot', 'www_root' => APP . 'webroot', 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => ['plugins' => [APP . 'Plugin' . DS], 'templates' => [APP . 'Template' . DS]]]); Configure::write('Session', ['defaults' => 'php']); Cache::config(['_cake_core_' => ['engine' => 'File', 'prefix' => 'cake_core_', 'serialize' => true], '_cake_model_' => ['engine' => 'File', 'prefix' => 'cake_model_', 'serialize' => true], 'default' => ['engine' => 'File', 'prefix' => 'default_', 'serialize' => true]]); $config = ['timezone' => 'UTC']; // Use the test connection for 'debug_kit' as well. ConnectionManager::config('test', $config); ConnectionManager::config('test_debug_http', $config); Log::config(['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']]);
use Cake\Core\Configure; use Cake\Core\Plugin; use Cake\Datasource\ConnectionManager; use Cake\Log\Log; require_once 'vendor/autoload.php'; // Path constants to a few helpful things. define('DS', DIRECTORY_SEPARATOR); define('ROOT', dirname(__DIR__) . DS); define('CAKE_CORE_INCLUDE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp'); define('CORE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp' . DS); define('CAKE', CORE_PATH . 'src' . DS); define('APP', ROOT . 'tests' . DS . 'test_app' . DS); define('TMP', sys_get_temp_dir() . DS); define('CACHE', TMP); define('LOGS', TMP); $loader = new \Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('Cake\\Test\\Fixture', ROOT . '/vendor/cakephp/cakephp/tests/Fixture'); require_once CORE_PATH . 'config/bootstrap.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); Configure::write('debug', true); Configure::write('App', ['namespace' => 'App', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => 'src', 'webroot' => 'webroot', 'www_root' => APP . 'webroot', 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => ['plugins' => [APP . 'Plugin' . DS], 'templates' => [APP . 'Template' . DS]]]); Configure::write('Session', ['defaults' => 'php']); Cache::config(['_cake_core_' => ['engine' => 'File', 'prefix' => 'cake_core_', 'serialize' => true], '_cake_model_' => ['engine' => 'File', 'prefix' => 'cake_model_', 'serialize' => true], 'default' => ['engine' => 'File', 'prefix' => 'default_', 'serialize' => true]]); // Ensure default test connection is defined if (!getenv('db_class')) { putenv('db_class=Cake\\Database\\Driver\\Sqlite'); putenv('db_dsn=sqlite::memory:'); } ConnectionManager::config('test', ['className' => 'Cake\\Database\\Connection', 'driver' => getenv('db_class'), 'dsn' => getenv('db_dsn'), 'database' => getenv('db_database'), 'username' => getenv('db_login'), 'password' => getenv('db_password'), 'timezone' => 'UTC']);
define('CORE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp' . DS); define('CAKE', CORE_PATH . 'src' . DS); define('APP', ROOT . 'tests' . DS . 'App' . DS); define('TMP', sys_get_temp_dir() . DS); define('CACHE', TMP); define('LOGS', TMP); define('CONFIG', ROOT . 'config' . DS); //@codingStandardsIgnoreStart @mkdir(LOGS); @mkdir(SESSIONS); @mkdir(CACHE); @mkdir(CACHE . 'views'); @mkdir(CACHE . 'models'); //@codingStandardsIgnoreEnd require CAKE . 'Core/ClassLoader.php'; $loader = new Cake\Core\ClassLoader(); $loader->register(); require_once CORE_PATH . 'config' . DS . 'bootstrap.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); Configure::write('debug', true); Configure::write('App', ['namespace' => 'Utils\\Test\\App', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => 'src', 'webroot' => 'webroot', 'www_root' => APP . 'webroot', 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => ['plugins' => [APP . 'Plugin' . DS], 'templates' => [APP . 'Template' . DS]]]); Cache::config(['_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_class')) { putenv('db_class=Cake\\Database\\Driver\\Sqlite'); putenv('db_dsn=sqlite::memory:'); } ConnectionManager::config('test', ['className' => 'Cake\\Database\\Connection', 'driver' => getenv('db_class'), 'dsn' => getenv('db_dsn'), 'database' => getenv('db_database'), 'username' => getenv('db_login'), 'password' => getenv('db_password'), 'timezone' => 'UTC']); Configure::write('Session', ['defaults' => 'php']); Log::config(['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']]);
define('CORE_TEST_CASES', CORE_TESTS . 'TestCase'); define('TEST_APP', CORE_TESTS . 'test_app' . DS); define('LOG_ERROR', LOG_ERR); // Point app constants to the test app. define('APP', TEST_APP . 'TestApp' . DS); define('WWW_ROOT', TEST_APP . WEBROOT_DIR . DS); define('TESTS', TEST_APP . 'tests' . DS); //@codingStandardsIgnoreStart @mkdir(LOGS); @mkdir(SESSIONS); @mkdir(CACHE); @mkdir(CACHE . 'views'); @mkdir(CACHE . 'models'); //@codingStandardsIgnoreEnd require CAKE . 'Core/ClassLoader.php'; $loader = new Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('TestApp', APP); $loader->addNamespace('TestPlugin', TEST_APP . 'Plugin/TestPlugin'); $loader->addNamespace('TestPluginTwo', TEST_APP . 'Plugin/TestPluginTwo'); $loader->addNamespace('PluginJs', TEST_APP . 'Plugin/PluginJs'); require CAKE . 'bootstrap.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); Configure::write('debug', true); Configure::write('App', ['namespace' => 'App', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => APP_DIR, 'webroot' => WEBROOT_DIR, 'www_root' => WWW_ROOT, 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => ['plugins' => [TEST_APP . 'Plugin' . DS], 'templates' => [APP . 'Template' . DS]]]); Cache::config(['_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_class')) { putenv('db_class=Cake\\Database\\Driver\\Sqlite'); putenv('db_dsn=sqlite::memory:');
define('CORE_TEST_CASES', CORE_TESTS . 'TestCase'); define('TEST_APP', ROOT . DS . 'tests' . DS . 'test_app' . DS); define('LOG_ERROR', LOG_ERR); // Point app constants to the test app. define('APP', TEST_APP . 'TestApp' . DS); define('WWW_ROOT', TEST_APP . WEBROOT_DIR . DS); define('TESTS', TEST_APP . 'tests' . DS); //@codingStandardsIgnoreStart @mkdir(LOGS); @mkdir(SESSIONS); @mkdir(CACHE); @mkdir(CACHE . 'views'); @mkdir(CACHE . 'models'); //@codingStandardsIgnoreEnd require CAKE . 'Core/ClassLoader.php'; $loader = new Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('Cake\\Test\\Fixture', ROOT . '/vendor/cakephp/cakephp/tests/Fixture'); $loader->addNamespace('TestApp', APP); $loader->addNamespace('TestPlugin', TEST_APP . 'Plugin/TestPlugin/src'); $loader->addNamespace('Nested\\TestPluginTwo', TEST_APP . 'Plugin/Nested/TestPluginTwo/src'); $loader->addNamespace('PluginJs', TEST_APP . 'Plugin/PluginJs/src'); require_once CORE_PATH . 'config' . DS . 'bootstrap.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); Configure::write('debug', true); Configure::write('App', ['namespace' => 'Acl', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => APP_DIR, 'webroot' => WEBROOT_DIR, 'www_root' => WWW_ROOT, 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => ['plugins' => [TEST_APP . 'Plugin' . DS], 'templates' => [APP . 'Template' . DS]]]); Cache::config(['_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_class')) { putenv('db_class=Cake\\Database\\Driver\\Sqlite');
/** * Configure paths required to find CakePHP + general filepath * constants */ require __DIR__ . '/paths.php'; // Use composer to load the autoloader. if (file_exists(ROOT . '/vendor/autoload.php')) { require ROOT . '/vendor/autoload.php'; } // If composer is not used, use CakePHP's classloader to autoload the framework // and the application. You will also need setup autoloading for plugins by // passing `autoload' => true for `Plugin::loadAll()` or `Plugin::load()` if (!class_exists('Cake\\Core\\Configure')) { require CAKE . 'Core/ClassLoader.php'; $loader = new \Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('Cake', CAKE); $loader->addNamespace(\Cake\Core\Configure::read('App.namespace'), APP); } /** * Bootstrap CakePHP. * * Does the various bits of setup that CakePHP needs to do. * This includes: * * - Registering the CakePHP autoloader. * - Setting the default application paths. */ require CORE_PATH . 'config' . DS . 'bootstrap.php'; use Cake\Cache\Cache;
define('ROOT', dirname(__DIR__)); define('TMP', ROOT . DS . 'tmp' . DS); define('LOGS', TMP . 'logs' . DS); define('CACHE', TMP . 'cache' . DS); define('APP', sys_get_temp_dir()); define('APP_DIR', 'src'); define('CAKE_CORE_INCLUDE_PATH', ROOT . '/vendor/cakephp/cakephp'); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); define('CAKE', CORE_PATH . APP_DIR . DS); define('WWW_ROOT', ROOT . DS . 'webroot' . DS); define('CONFIG', dirname(__FILE__) . DS . 'config' . DS); ini_set('intl.default_locale', 'de-DE'); require ROOT . '/vendor/cakephp/cakephp/src/basics.php'; require ROOT . '/vendor/autoload.php'; require CAKE . 'Core/ClassLoader.php'; $loader = new Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('TestApp', ROOT . DS . 'tests' . DS . 'TestApp' . DS); Cake\Core\Configure::write('App', ['namespace' => 'App', 'encoding' => 'UTF-8']); Cake\Core\Configure::write('debug', true); mb_internal_encoding('UTF-8'); date_default_timezone_set('UTC'); $Tmp = new Cake\Filesystem\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']]; Cake\Cache\Cache::config($cache); Cake\Core\Plugin::load('Feed', ['path' => ROOT . DS, 'bootstrap' => true]); // Ensure default test connection is defined if (!getenv('db_class')) {
require_once 'vendor/autoload.php'; // Path constants to a few helpful things. define('ROOT', dirname(__DIR__) . DS); define('CAKE_CORE_INCLUDE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp'); define('CORE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp' . DS); define('CAKE', CORE_PATH . 'src' . DS); define('TESTS', ROOT . 'tests'); define('APP', ROOT . 'tests' . DS . 'test_app' . DS); define('APP_DIR', 'test_app'); define('WEBROOT_DIR', 'webroot'); define('WWW_ROOT', APP . 'webroot' . DS); define('TMP', sys_get_temp_dir() . DS); define('CONFIG', APP . 'config' . DS); define('CACHE', TMP); define('LOGS', TMP); $loader = new \Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('TestApp', APP); $loader->addNamespace('SparkPostEmailTestPlugin', APP . 'Plugin' . DS . 'TestPlugin' . DS . 'src'); require_once CORE_PATH . 'config/bootstrap.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); Configure::write('debug', true); Configure::write('App', ['namespace' => 'App', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => 'src', 'webroot' => 'webroot', 'www_root' => APP . 'webroot', 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => ['plugins' => [APP . 'Plugin' . DS], 'templates' => [APP . 'Template' . DS]]]); Configure::write('Session', ['defaults' => 'php']); Cache::config(['_cake_core_' => ['engine' => 'File', 'prefix' => 'cake_core_', 'serialize' => true], '_cake_model_' => ['engine' => 'File', 'prefix' => 'cake_model_', 'serialize' => true], 'default' => ['engine' => 'File', 'prefix' => 'default_', 'serialize' => true]]); // Ensure default test connection is defined if (!getenv('db_dsn')) { putenv('db_dsn=sqlite://127.0.0.1/' . TMP . 'debug_kit_test.sqlite'); } $config = ['url' => getenv('db_dsn'), 'timezone' => 'UTC'];
require_once 'vendor/autoload.php'; // Path constants to a few helpful things. define('ROOT', dirname(__DIR__) . DS); define('CAKE_CORE_INCLUDE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp'); define('CORE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp' . DS); define('CAKE', CORE_PATH . 'src' . DS); define('TESTS', ROOT . 'tests'); define('APP', ROOT . 'tests' . DS . 'test_app' . DS); define('APP_DIR', 'test_app'); define('WEBROOT_DIR', 'webroot'); define('WWW_ROOT', APP . 'webroot' . DS); define('TMP', sys_get_temp_dir() . DS); define('CONFIG', APP . 'config' . DS); define('CACHE', TMP); define('LOGS', TMP); $loader = new \Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('TestApp', APP); $loader->addNamespace('RememberMeTestPlugin', APP . 'Plugin' . DS . 'TestPlugin' . DS . 'src'); require_once CORE_PATH . 'config/bootstrap.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); Configure::write('debug', true); Configure::write('App', ['namespace' => 'App', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => 'src', 'webroot' => 'webroot', 'www_root' => APP . 'webroot', 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => ['plugins' => [APP . 'Plugin' . DS], 'templates' => [APP . 'Template' . DS]]]); Configure::write('Session', ['defaults' => 'php']); Cache::config(['_cake_core_' => ['engine' => 'File', 'prefix' => 'cake_core_', 'serialize' => true], '_cake_model_' => ['engine' => 'File', 'prefix' => 'cake_model_', 'serialize' => true], 'default' => ['engine' => 'File', 'prefix' => 'default_', 'serialize' => true]]); // Ensure default test connection is defined if (!getenv('db_dsn')) { putenv('db_dsn=sqlite://127.0.0.1/' . TMP . 'debug_kit_test.sqlite'); } $config = ['url' => getenv('db_dsn'), 'timezone' => 'UTC'];
use Cake\Core\Configure; use Cake\Core\Plugin; use Cake\Datasource\ConnectionManager; use Cake\I18n\I18n; use Cake\Log\Log; require_once 'vendor/autoload.php'; // Path constants to a few helpful things. define('ROOT', dirname(__DIR__) . DS); define('CAKE_CORE_INCLUDE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp'); define('CORE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp' . DS); define('CAKE', CORE_PATH . 'src' . DS); define('APP', ROOT . 'tests' . DS . 'test_app' . DS); define('TMP', sys_get_temp_dir() . DS); define('CACHE', TMP); define('LOGS', TMP); $loader = new \Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('TestApp', APP); $loader->addNamespace('AuthenticateTestPlugin', APP . 'Plugin' . DS . 'TestPlugin' . DS . 'src'); require_once CORE_PATH . 'config/bootstrap.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); Configure::write('debug', true); Configure::write('App', ['namespace' => 'App', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => 'src', 'webroot' => 'webroot', 'www_root' => APP . 'webroot', 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => ['plugins' => [APP . 'Plugin' . DS], 'templates' => [APP . 'Template' . DS]]]); Configure::write('Session', ['defaults' => 'php']); Cache::config(['_cake_core_' => ['engine' => 'File', 'prefix' => 'cake_core_', 'serialize' => true], '_cake_model_' => ['engine' => 'File', 'prefix' => 'cake_model_', 'serialize' => true], 'default' => ['engine' => 'File', 'prefix' => 'default_', 'serialize' => true]]); // Ensure default test connection is defined if (!getenv('db_class')) { putenv('db_class=Cake\\Database\\Driver\\Sqlite'); putenv('db_dsn=sqlite::memory:'); }
define('CORE_TESTS', CORE_PATH . 'tests' . DS); define('CORE_TEST_CASES', CORE_TESTS . 'TestCase'); define('TEST_APP', CORE_TESTS . 'test_app' . DS); // Point app constants to the test app. define('APP', TEST_APP . 'TestApp' . DS); define('WWW_ROOT', TEST_APP . 'webroot' . DS); define('CONFIG', TEST_APP . 'config' . DS); //@codingStandardsIgnoreStart @mkdir(LOGS); @mkdir(SESSIONS); @mkdir(CACHE); @mkdir(CACHE . 'views'); @mkdir(CACHE . 'models'); //@codingStandardsIgnoreEnd require CAKE . 'Core/ClassLoader.php'; $loader = new Cake\Core\ClassLoader(); $loader->register(); $loader->addNamespace('TestApp', APP); $loader->addNamespace('TestPlugin', TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'src'); $loader->addNamespace('TestPlugin\\Test', TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'tests'); $loader->addNamespace('TestPluginTwo', TEST_APP . 'Plugin' . DS . 'TestPluginTwo' . DS . 'src'); $loader->addNamespace('PluginJs', TEST_APP . 'Plugin' . DS . 'PluginJs' . DS . 'src'); require_once CORE_PATH . 'config/bootstrap.php'; date_default_timezone_set('UTC'); mb_internal_encoding('UTF-8'); Configure::write('debug', true); Configure::write('App', ['namespace' => 'App', 'encoding' => 'UTF-8', 'base' => false, 'baseUrl' => false, 'dir' => APP_DIR, 'webroot' => 'webroot', 'www_root' => WWW_ROOT, 'fullBaseUrl' => 'http://localhost', 'imageBaseUrl' => 'img/', 'jsBaseUrl' => 'js/', 'cssBaseUrl' => 'css/', 'paths' => ['plugins' => [TEST_APP . 'Plugin' . DS], 'templates' => [APP . 'Template' . DS]]]); Cache::config(['_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:');