pictcode / lib / Cake / Console / Templates / skel / webroot / test.php @ 0b1b8047
履歴 | 表示 | アノテート | ダウンロード (2.857 KB)
1 | 635eef61 | spyder1211 | <?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 | if (!defined('ROOT')) { |
||
30 | define('ROOT', dirname(dirname(dirname(__FILE__)))); |
||
31 | } |
||
32 | |||
33 | /**
|
||
34 | * The actual directory name for the "app".
|
||
35 | */
|
||
36 | if (!defined('APP_DIR')) { |
||
37 | define('APP_DIR', basename(dirname(dirname(__FILE__)))); |
||
38 | } |
||
39 | |||
40 | /**
|
||
41 | * The absolute path to the "Cake" directory, WITHOUT a trailing DS.
|
||
42 | *
|
||
43 | * For ease of development CakePHP uses PHP's include_path. If you
|
||
44 | * need to cannot modify your include_path, you can set this path.
|
||
45 | *
|
||
46 | * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
|
||
47 | *
|
||
48 | * The following line differs from its sibling
|
||
49 | * /app/webroot/test.php
|
||
50 | */
|
||
51 | //define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
|
||
52 | |||
53 | /**
|
||
54 | * This auto-detects CakePHP as a composer installed library.
|
||
55 | * You may remove this if you are not planning to use composer (not recommended, though).
|
||
56 | */
|
||
57 | $vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib'; |
||
58 | $dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php'; |
||
59 | if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) { |
||
60 | define('CAKE_CORE_INCLUDE_PATH', $vendorPath); |
||
61 | } |
||
62 | |||
63 | /**
|
||
64 | * Editing below this line should not be necessary.
|
||
65 | * Change at your own risk.
|
||
66 | */
|
||
67 | if (!defined('WEBROOT_DIR')) { |
||
68 | define('WEBROOT_DIR', basename(dirname(__FILE__))); |
||
69 | } |
||
70 | if (!defined('WWW_ROOT')) { |
||
71 | define('WWW_ROOT', dirname(__FILE__) . DS); |
||
72 | } |
||
73 | |||
74 | if (!defined('CAKE_CORE_INCLUDE_PATH')) { |
||
75 | if (function_exists('ini_set')) { |
||
76 | ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); |
||
77 | } |
||
78 | if (!include 'Cake' . DS . 'bootstrap.php') { |
||
79 | $failed = true; |
||
80 | } |
||
81 | } else {
|
||
82 | if (!include CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php') { |
||
83 | $failed = true; |
||
84 | } |
||
85 | } |
||
86 | if (!empty($failed)) { |
||
87 | 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); |
||
88 | } |
||
89 | |||
90 | if (Configure::read('debug') < 1) { |
||
91 | throw new NotFoundException(__d('cake_dev', 'Debug setting does not allow access to this URL.')); |
||
92 | } |
||
93 | |||
94 | require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php'; |
||
95 | |||
96 | CakeTestSuiteDispatcher::run(); |