|
| 1 | +<?php |
| 2 | + |
| 3 | +// @codingStandardsIgnoreFile |
| 4 | +use Cake\Cache\Cache; |
| 5 | +use Cake\Core\Configure; |
| 6 | +use Cake\Core\Plugin; |
| 7 | +use Cake\Datasource\ConnectionManager; |
| 8 | +use Cake\I18n\I18n; |
| 9 | +require_once 'vendor/autoload.php'; |
| 10 | +// Path constants to a few helpful things. |
| 11 | +if (!defined('DS')) { |
| 12 | + define('DS', DIRECTORY_SEPARATOR); |
| 13 | +} |
| 14 | +define('ROOT', dirname(__DIR__) . DS); |
| 15 | +define('CAKE_CORE_INCLUDE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp'); |
| 16 | +define('CORE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp' . DS); |
| 17 | +define('CAKE', CORE_PATH . 'src' . DS); |
| 18 | +define('TESTS', ROOT . 'tests'); |
| 19 | +define('APP', ROOT . 'tests' . DS . 'test_files' . DS . 'app' . DS); |
| 20 | +define('APP_DIR', 'app'); |
| 21 | +define('WEBROOT_DIR', 'webroot'); |
| 22 | +define('WWW_ROOT', dirname(APP) . DS . 'webroot' . DS); |
| 23 | +define('TMP', sys_get_temp_dir() . DS); |
| 24 | +define('CONFIG', APP . 'config' . DS); |
| 25 | +define('CACHE', TMP); |
| 26 | +define('LOGS', TMP); |
| 27 | +require_once CORE_PATH . 'config/bootstrap.php'; |
| 28 | +date_default_timezone_set('UTC'); |
| 29 | +mb_internal_encoding('UTF-8'); |
| 30 | +Configure::write('debug', true); |
| 31 | +Configure::write('App', [ |
| 32 | + 'namespace' => 'App', |
| 33 | + 'encoding' => 'UTF-8', |
| 34 | + 'base' => false, |
| 35 | + 'baseUrl' => false, |
| 36 | + 'dir' => 'src', |
| 37 | + 'webroot' => WEBROOT_DIR, |
| 38 | + 'www_root' => WWW_ROOT, |
| 39 | + 'fullBaseUrl' => 'http://localhost', |
| 40 | + 'imageBaseUrl' => 'img/', |
| 41 | + 'jsBaseUrl' => 'js/', |
| 42 | + 'cssBaseUrl' => 'css/', |
| 43 | + 'paths' => [ |
| 44 | + 'plugins' => [dirname(APP) . DS . 'plugins' . DS], |
| 45 | + 'templates' => [APP . 'Template' . DS] |
| 46 | + ] |
| 47 | +]); |
| 48 | +Cache::config([ |
| 49 | + '_cake_core_' => [ |
| 50 | + 'engine' => 'File', |
| 51 | + 'prefix' => 'cake_core_', |
| 52 | + 'serialize' => true |
| 53 | + ], |
| 54 | + '_cake_model_' => [ |
| 55 | + 'engine' => 'File', |
| 56 | + 'prefix' => 'cake_model_', |
| 57 | + 'serialize' => true |
| 58 | + ] |
| 59 | +]); |
| 60 | +Plugin::load('Bootstrap', ['path' => ROOT]); |
0 commit comments