From b42a6b6578dd6f07c95475442073634e487dff9e Mon Sep 17 00:00:00 2001 From: DarkAngelBGE Date: Mon, 12 May 2008 18:46:12 +0000 Subject: [PATCH] fixing code coverage manager.test to be able to be run from group tests itself git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6819 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/libs/code_coverage_manager.test.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cake/tests/cases/libs/code_coverage_manager.test.php b/cake/tests/cases/libs/code_coverage_manager.test.php index 88059a007..769ce8f49 100644 --- a/cake/tests/cases/libs/code_coverage_manager.test.php +++ b/cake/tests/cases/libs/code_coverage_manager.test.php @@ -47,6 +47,7 @@ class CodeCoverageManagerTest extends UnitTestCase { function testNoTestCaseSupplied() { if (php_sapi_name() != 'cli') { + unset($_GET['group']); CodeCoverageManager::start(substr(md5(microtime()), 0, 5), new CakeHtmlReporter()); CodeCoverageManager::report(false); $this->assertError(); @@ -68,11 +69,11 @@ class CodeCoverageManagerTest extends UnitTestCase { return ($var != basename(__FILE__)); } $contents[1] = array_filter($contents[1], "remove"); - $keys = array_rand($contents[1], 5); - foreach ($keys as $key) { - CodeCoverageManager::start('libs'.DS.$contents[1][$key], new CakeHtmlReporter()); + + foreach ($contents[1] as $file) { + CodeCoverageManager::start('libs'.DS.$file, new CakeHtmlReporter()); CodeCoverageManager::report(false); - $this->assertNoErrors(); + $this->assertNoErrors('libs'.DS.$file); } } }