Skip to content

Commit

Permalink
Moving skel/config/sql to skel/config/schema
Browse files Browse the repository at this point in the history
Updating index.php and test.php in skel dir.
  • Loading branch information
markstory committed Jan 13, 2010
1 parent 84840c7 commit f93094b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 88 deletions.
12 changes: 5 additions & 7 deletions cake/console/templates/skel/webroot/index.php
@@ -1,6 +1,8 @@
<?php
/**
* Short description for file.
* Index
*
* The Front Controller for handling every request
*
* PHP versions 4 and 5
*
Expand All @@ -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.
Expand All @@ -38,15 +38,13 @@
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}

/**
* The actual directory name for the "app".
*
*/
if (!defined('APP_DIR')) {
define('APP_DIR', basename(dirname(dirname(__FILE__))));
}

/**
* The absolute path to the "cake" directory, WITHOUT a trailing DS.
*
Expand All @@ -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.
*
*/
Expand Down
85 changes: 4 additions & 81 deletions cake/console/templates/skel/webroot/test.php
Expand Up @@ -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
Expand Down Expand Up @@ -85,89 +84,13 @@
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));
}

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);

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);
}

if (!App::import('Vendor', 'simpletest' . DS . 'reporter')) {
CakePHPTestHeader();
include CAKE_TESTS_LIB . 'simpletest.php';
CakePHPTestSuiteFooter();
exit();
die(__('Debug setting does not allow access to this url.', true));
}

$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();
}
}
require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php';

CakePHPTestRunMore();
CakePHPTestAnalyzeCodeCoverage();
} elseif (isset($_GET['case'])) {
if ($analyzeCodeCoverage) {
CodeCoverageManager::start($_GET['case'], CakeTestsGetReporter());
}

TestManager::runTestCase($_GET['case'], CakeTestsGetReporter());

if ($analyzeCodeCoverage) {
CodeCoverageManager::report();
}
$Dispatcher = new CakeTestSuiteDispatcher();
$Dispatcher->dispatch();

CakePHPTestRunMore();
CakePHPTestAnalyzeCodeCoverage();
} elseif (isset($_GET['show']) && $_GET['show'] == 'cases') {
CakePHPTestCaseList();
} else {
CakePHPTestGroupTestList();
}
CakePHPTestSuiteFooter();
$output = ob_get_clean();
echo $output;
?>

0 comments on commit f93094b

Please sign in to comment.