/** * Static method to initialize the test runner, keeps global space clean * * @return void */ public static function run() { $dispatcher = new CakeTestSuiteDispatcher(); $dispatcher->dispatch(); }
define('WWW_ROOT', dirname(__FILE__) . DS); } if (!defined('CORE_PATH')) { if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) { define('APP_PATH', null); define('CORE_PATH', null); } else { define('APP_PATH', ROOT . DS . APP_DIR . DS); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } } if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } $corePath = App::core('cake'); if (isset($corePath[0])) { define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); } else { define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH); } if (Configure::read('debug') < 1) { die(__('Debug setting does not allow access to this url.', true)); } require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php'; $Dispatcher = new CakeTestSuiteDispatcher(); $Dispatcher->dispatch();