bootstrap.php 1.0 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Test runner bootstrap.
  4. *
  5. * Add additional configuration/setup your application needs when running
  6. * unit tests in this file.
  7. */
  8. //require dirname(__DIR__) . '/../Config/bootstrap.php';
  9. define('DS', DIRECTORY_SEPARATOR);
  10. define('ROOT', dirname(dirname(dirname(dirname(__FILE__)))));
  11. define('APP_DIR', 'App');
  12. define('WEBROOT_DIR', 'webroot');
  13. define('APP', ROOT . DS . APP_DIR . DS);
  14. define('WWW_ROOT', ROOT . DS . WEBROOT_DIR . DS);
  15. define('TESTS', ROOT . DS . 'Test' . DS);
  16. define('TMP', ROOT . DS . 'tmp' . DS);
  17. define('LOGS', TMP . 'logs' . DS);
  18. define('CACHE', TMP . 'cache' . DS);
  19. define('CAKE_CORE_INCLUDE_PATH', ROOT . '/vendor/cakephp/cakephp');
  20. define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
  21. define('CAKE', CORE_PATH . 'src' . DS);
  22. require ROOT . '/vendor/cakephp/cakephp/src/basics.php';
  23. require ROOT . '/vendor/autoload.php';
  24. $TMP = new \Cake\Utility\Folder(TMP);
  25. $TMP->create(TMP . 'cache/models', 0777);
  26. $TMP->create(TMP . 'cache/persistent', 0777);
  27. $TMP->create(TMP . 'cache/views', 0777);