From f6662921c2ab0dba5bf2ccad6346ca23ebf471f3 Mon Sep 17 00:00:00 2001 From: phpnut Date: Sun, 11 Sep 2005 04:51:40 +0000 Subject: [PATCH] merging from my sandbox git-svn-id: https://svn.cakephp.org/repo/trunk/cake@795 3807eeeb-6ff5-0310-8944-8be069107fe0 --- app/controllers/tests_controller.php | 13 ++----- tests/index.php | 6 ++- tests/lib/test_manager.php | 58 +++++++++++++++++++++++----- 3 files changed, 58 insertions(+), 19 deletions(-) diff --git a/app/controllers/tests_controller.php b/app/controllers/tests_controller.php index ed276d991..0cf5652c3 100644 --- a/app/controllers/tests_controller.php +++ b/app/controllers/tests_controller.php @@ -50,23 +50,18 @@ class TestsController extends TestsHelper { function groups () { $this->layout = null; + $_GET['show'] = 'groups'; require_once TESTS.'index.php'; + exit(); } function cases () { $this->layout = null; + $_GET['show'] = 'cases'; require_once TESTS.'index.php'; + exit(); } -/** - * Runs all library and application tests - * - */ -// function test_all () -// { -// $this->layout = null; -// require_once SCRIPTS.'test.php'; -// } } ?> diff --git a/tests/index.php b/tests/index.php index 459419a53..a1d83b498 100644 --- a/tests/index.php +++ b/tests/index.php @@ -119,7 +119,11 @@ define('CAKE_TEST_OUTPUT_TEXT',3); case CAKE_TEST_OUTPUT_XML: break; case CAKE_TEST_OUTPUT_HTML: - echo "

Run more tests

"; + $link = class_exists('Object') + ? "

Run more tests

\n" + : + "

Run more tests

\n"; + echo $link; break; case CAKE_TEST_OUTPUT_TEXT: diff --git a/tests/lib/test_manager.php b/tests/lib/test_manager.php index 478b235e0..8a4b61280 100644 --- a/tests/lib/test_manager.php +++ b/tests/lib/test_manager.php @@ -91,7 +91,17 @@ class TestManager } $testCases =& $manager->_getTestFileList($testCasePath); - $test =& new GroupTest('All Tests'); + + + $test =& new GroupTest('All Core Tests'); + if (isset($_GET['app'])) + { + $test =& new GroupTest('All App Tests'); + } + else + { + $test =& new GroupTest('All Core Tests'); + } foreach ($testCases as $testCase) { @@ -391,12 +401,29 @@ class HtmlTestManager extends TestManager { return "

No test groups set up!

"; } - $buffer = "

Available test groups:

\n