OSDN Git Service

first commit
[exmascake/exmascake.git] / app / webroot / test.php
1 <?php
2 /**
3  * Web Access Frontend for TestSuite
4  *
5  * PHP 5
6  *
7  * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
8  * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
9  *
10  * Licensed under The MIT License
11  * Redistributions of files must retain the above copyright notice
12  *
13  * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
14  * @link          http://book.cakephp.org/2.0/en/development/testing.html
15  * @package       app.webroot
16  * @since         CakePHP(tm) v 1.2.0.4433
17  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
18  */
19 set_time_limit(0);
20 ini_set('display_errors', 1);
21 /**
22  * Use the DS to separate the directories in other defines
23  */
24 if (!defined('DS')) {
25         define('DS', DIRECTORY_SEPARATOR);
26 }
27 /**
28  * These defines should only be edited if you have cake installed in
29  * a directory layout other than the way it is distributed.
30  * When using custom settings be sure to use the DS and do not add a trailing DS.
31  */
32
33 /**
34  * The full path to the directory which holds "app", WITHOUT a trailing DS.
35  *
36  */
37 if (!defined('ROOT')) {
38         define('ROOT', dirname(dirname(dirname(__FILE__))));
39 }
40 /**
41  * The actual directory name for the "app".
42  *
43  */
44 if (!defined('APP_DIR')) {
45         define('APP_DIR', basename(dirname(dirname(__FILE__))));
46 }
47
48 /**
49  * The absolute path to the "Cake" directory, WITHOUT a trailing DS.
50  *
51  * For ease of development CakePHP uses PHP's include_path.  If you
52  * need to cannot modify your include_path, you can set this path.
53  *
54  * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
55  */
56         //define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
57
58 /**
59  * Editing below this line should not be necessary.
60  * Change at your own risk.
61  *
62  */
63 if (!defined('WEBROOT_DIR')) {
64         define('WEBROOT_DIR', basename(dirname(__FILE__)));
65 }
66 if (!defined('WWW_ROOT')) {
67         define('WWW_ROOT', dirname(__FILE__) . DS);
68 }
69
70 if (!defined('CAKE_CORE_INCLUDE_PATH')) {
71         if (function_exists('ini_set')) {
72                 ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
73         }
74         if (!include ('Cake' . DS . 'bootstrap.php')) {
75                 $failed = true;
76         }
77 } else {
78         if (!include (CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) {
79                 $failed = true;
80         }
81 }
82 if (!empty($failed)) {
83         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);
84 }
85
86 if (Configure::read('debug') < 1) {
87         die(__d('cake_dev', 'Debug setting does not allow access to this url.'));
88 }
89
90 require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
91
92 CakeTestSuiteDispatcher::run();