mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Moving skel/config/sql to skel/config/schema
Updating index.php and test.php in skel dir.
This commit is contained in:
parent
84840c7b04
commit
f93094b6ea
8 changed files with 9 additions and 88 deletions
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* Short description for file.
|
||||
* Index
|
||||
*
|
||||
* The Front Controller for handling every request
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
|
@ -11,20 +13,18 @@
|
|||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @link http://cakephp.org
|
||||
* @package cake
|
||||
* @subpackage cake.app.webroot
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Use the DS to separate the directories in other defines
|
||||
*/
|
||||
if (!defined('DS')) {
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* These defines should only be edited if you have cake installed in
|
||||
* a directory layout other than the way it is distributed.
|
||||
|
@ -38,7 +38,6 @@
|
|||
if (!defined('ROOT')) {
|
||||
define('ROOT', dirname(dirname(dirname(__FILE__))));
|
||||
}
|
||||
|
||||
/**
|
||||
* The actual directory name for the "app".
|
||||
*
|
||||
|
@ -46,7 +45,6 @@
|
|||
if (!defined('APP_DIR')) {
|
||||
define('APP_DIR', basename(dirname(dirname(__FILE__))));
|
||||
}
|
||||
|
||||
/**
|
||||
* The absolute path to the "cake" directory, WITHOUT a trailing DS.
|
||||
*
|
||||
|
@ -56,7 +54,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Editing below this line should not be necessary.
|
||||
* Editing below this line should NOT be necessary.
|
||||
* Change at your own risk.
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||
*/
|
||||
set_time_limit(0);
|
||||
ini_set('memory_limit','128M');
|
||||
ini_set('display_errors', 1);
|
||||
/**
|
||||
* Use the DS to separate the directories in other defines
|
||||
|
@ -85,89 +84,13 @@ if (isset($corePath[0])) {
|
|||
define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH);
|
||||
}
|
||||
|
||||
require_once CAKE_TESTS_LIB . 'test_manager.php';
|
||||
|
||||
if (Configure::read('debug') < 1) {
|
||||
exit(__('Debug setting does not allow access to this url.', true));
|
||||
die(__('Debug setting does not allow access to this url.', true));
|
||||
}
|
||||
|
||||
if (!isset($_SERVER['SERVER_NAME'])) {
|
||||
$_SERVER['SERVER_NAME'] = '';
|
||||
}
|
||||
if (empty( $_GET['output'])) {
|
||||
$_GET['output'] = 'html';
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Used to determine output to display
|
||||
*/
|
||||
define('CAKE_TEST_OUTPUT_HTML', 1);
|
||||
define('CAKE_TEST_OUTPUT_TEXT', 2);
|
||||
require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php';
|
||||
|
||||
if (isset($_GET['output']) && $_GET['output'] == 'html') {
|
||||
define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_HTML);
|
||||
} else {
|
||||
Debugger::output('txt');
|
||||
define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_TEXT);
|
||||
}
|
||||
$Dispatcher = new CakeTestSuiteDispatcher();
|
||||
$Dispatcher->dispatch();
|
||||
|
||||
if (!App::import('Vendor', 'simpletest' . DS . 'reporter')) {
|
||||
CakePHPTestHeader();
|
||||
include CAKE_TESTS_LIB . 'simpletest.php';
|
||||
CakePHPTestSuiteFooter();
|
||||
exit();
|
||||
}
|
||||
|
||||
$analyzeCodeCoverage = false;
|
||||
if (isset($_GET['code_coverage'])) {
|
||||
$analyzeCodeCoverage = true;
|
||||
require_once CAKE_TESTS_LIB . 'code_coverage_manager.php';
|
||||
if (!extension_loaded('xdebug')) {
|
||||
CakePHPTestHeader();
|
||||
include CAKE_TESTS_LIB . 'xdebug.php';
|
||||
CakePHPTestSuiteFooter();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
CakePHPTestHeader();
|
||||
CakePHPTestSuiteHeader();
|
||||
define('RUN_TEST_LINK', $_SERVER['PHP_SELF']);
|
||||
|
||||
if (isset($_GET['group'])) {
|
||||
if ('all' == $_GET['group']) {
|
||||
TestManager::runAllTests(CakeTestsGetReporter());
|
||||
} else {
|
||||
if ($analyzeCodeCoverage) {
|
||||
CodeCoverageManager::start($_GET['group'], CakeTestsGetReporter());
|
||||
}
|
||||
TestManager::runGroupTest(ucfirst($_GET['group']), CakeTestsGetReporter());
|
||||
if ($analyzeCodeCoverage) {
|
||||
CodeCoverageManager::report();
|
||||
}
|
||||
}
|
||||
|
||||
CakePHPTestRunMore();
|
||||
CakePHPTestAnalyzeCodeCoverage();
|
||||
} elseif (isset($_GET['case'])) {
|
||||
if ($analyzeCodeCoverage) {
|
||||
CodeCoverageManager::start($_GET['case'], CakeTestsGetReporter());
|
||||
}
|
||||
|
||||
TestManager::runTestCase($_GET['case'], CakeTestsGetReporter());
|
||||
|
||||
if ($analyzeCodeCoverage) {
|
||||
CodeCoverageManager::report();
|
||||
}
|
||||
|
||||
CakePHPTestRunMore();
|
||||
CakePHPTestAnalyzeCodeCoverage();
|
||||
} elseif (isset($_GET['show']) && $_GET['show'] == 'cases') {
|
||||
CakePHPTestCaseList();
|
||||
} else {
|
||||
CakePHPTestGroupTestList();
|
||||
}
|
||||
CakePHPTestSuiteFooter();
|
||||
$output = ob_get_clean();
|
||||
echo $output;
|
||||
?>
|
Loading…
Reference in a new issue