mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
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
This commit is contained in:
parent
cdbc556db8
commit
b42a6b6578
1 changed files with 5 additions and 4 deletions
|
@ -47,6 +47,7 @@ class CodeCoverageManagerTest extends UnitTestCase {
|
||||||
|
|
||||||
function testNoTestCaseSupplied() {
|
function testNoTestCaseSupplied() {
|
||||||
if (php_sapi_name() != 'cli') {
|
if (php_sapi_name() != 'cli') {
|
||||||
|
unset($_GET['group']);
|
||||||
CodeCoverageManager::start(substr(md5(microtime()), 0, 5), new CakeHtmlReporter());
|
CodeCoverageManager::start(substr(md5(microtime()), 0, 5), new CakeHtmlReporter());
|
||||||
CodeCoverageManager::report(false);
|
CodeCoverageManager::report(false);
|
||||||
$this->assertError();
|
$this->assertError();
|
||||||
|
@ -68,11 +69,11 @@ class CodeCoverageManagerTest extends UnitTestCase {
|
||||||
return ($var != basename(__FILE__));
|
return ($var != basename(__FILE__));
|
||||||
}
|
}
|
||||||
$contents[1] = array_filter($contents[1], "remove");
|
$contents[1] = array_filter($contents[1], "remove");
|
||||||
$keys = array_rand($contents[1], 5);
|
|
||||||
foreach ($keys as $key) {
|
foreach ($contents[1] as $file) {
|
||||||
CodeCoverageManager::start('libs'.DS.$contents[1][$key], new CakeHtmlReporter());
|
CodeCoverageManager::start('libs'.DS.$file, new CakeHtmlReporter());
|
||||||
CodeCoverageManager::report(false);
|
CodeCoverageManager::report(false);
|
||||||
$this->assertNoErrors();
|
$this->assertNoErrors('libs'.DS.$file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue