| 15403 |
manish.sha |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* Web Access Frontend for TestSuite
|
|
|
4 |
*
|
|
|
5 |
* @link http://book.cakephp.org/2.0/en/development/testing.html
|
|
|
6 |
* @package app.webroot
|
|
|
7 |
* @since CakePHP(tm) v 1.2.0.4433
|
|
|
8 |
*/
|
|
|
9 |
|
|
|
10 |
set_time_limit(0);
|
|
|
11 |
ini_set('display_errors', 1);
|
|
|
12 |
|
|
|
13 |
/**
|
|
|
14 |
* Use the DS to separate the directories in other defines
|
|
|
15 |
*/
|
|
|
16 |
if (!defined('DS')) {
|
|
|
17 |
define('DS', DIRECTORY_SEPARATOR);
|
|
|
18 |
}
|
|
|
19 |
|
|
|
20 |
/**
|
|
|
21 |
* These defines should only be edited if you have CakePHP installed in
|
|
|
22 |
* a directory layout other than the way it is distributed.
|
|
|
23 |
* When using custom settings be sure to use the DS and do not add a trailing DS.
|
|
|
24 |
*/
|
|
|
25 |
|
|
|
26 |
/**
|
|
|
27 |
* The full path to the directory which holds "app", WITHOUT a trailing DS.
|
|
|
28 |
*
|
|
|
29 |
*/
|
|
|
30 |
if (!defined('ROOT')) {
|
|
|
31 |
define('ROOT', dirname(dirname(dirname(__FILE__))));
|
|
|
32 |
}
|
|
|
33 |
|
|
|
34 |
/**
|
|
|
35 |
* The actual directory name for the "app".
|
|
|
36 |
*
|
|
|
37 |
*/
|
|
|
38 |
if (!defined('APP_DIR')) {
|
|
|
39 |
define('APP_DIR', basename(dirname(dirname(__FILE__))));
|
|
|
40 |
}
|
|
|
41 |
|
|
|
42 |
/**
|
|
|
43 |
* The absolute path to the "Cake" directory, WITHOUT a trailing DS.
|
|
|
44 |
*
|
|
|
45 |
* For ease of development CakePHP uses PHP's include_path. If you
|
|
|
46 |
* need to cannot modify your include_path, you can set this path.
|
|
|
47 |
*
|
|
|
48 |
* Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
|
|
|
49 |
*
|
|
|
50 |
* The following line differs from its sibling
|
|
|
51 |
* /app/webroot/test.php
|
|
|
52 |
*/
|
|
|
53 |
//define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
|
|
|
54 |
|
|
|
55 |
/**
|
|
|
56 |
* This auto-detects CakePHP as a composer installed library.
|
|
|
57 |
* You may remove this if you are not planning to use composer (not recommended, though).
|
|
|
58 |
*/
|
|
|
59 |
$vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
|
|
|
60 |
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
|
|
|
61 |
if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
|
|
|
62 |
define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
/**
|
|
|
66 |
* Editing below this line should not be necessary.
|
|
|
67 |
* Change at your own risk.
|
|
|
68 |
*
|
|
|
69 |
*/
|
|
|
70 |
if (!defined('WEBROOT_DIR')) {
|
|
|
71 |
define('WEBROOT_DIR', basename(dirname(__FILE__)));
|
|
|
72 |
}
|
|
|
73 |
if (!defined('WWW_ROOT')) {
|
|
|
74 |
define('WWW_ROOT', dirname(__FILE__) . DS);
|
|
|
75 |
}
|
|
|
76 |
|
|
|
77 |
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
|
|
|
78 |
if (function_exists('ini_set')) {
|
|
|
79 |
ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
|
|
|
80 |
}
|
|
|
81 |
if (!include 'Cake' . DS . 'bootstrap.php') {
|
|
|
82 |
$failed = true;
|
|
|
83 |
}
|
|
|
84 |
} else {
|
|
|
85 |
if (!include CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php') {
|
|
|
86 |
$failed = true;
|
|
|
87 |
}
|
|
|
88 |
}
|
|
|
89 |
if (!empty($failed)) {
|
|
|
90 |
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);
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
if (Configure::read('debug') < 1) {
|
|
|
94 |
throw new NotFoundException(__d('cake_dev', 'Debug setting does not allow access to this URL.'));
|
|
|
95 |
}
|
|
|
96 |
|
|
|
97 |
require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
|
|
|
98 |
|
|
|
99 |
CakeTestSuiteDispatcher::run();
|