Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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