From 8b4b6da1a5762747c219cfcf4947b06cbe764103 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 7 Dec 2005 22:51:53 +0000 Subject: --- tests/UnitTests/framework/index.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tests/UnitTests/framework/index.php') diff --git a/tests/UnitTests/framework/index.php b/tests/UnitTests/framework/index.php index 9d745e23..54706599 100644 --- a/tests/UnitTests/framework/index.php +++ b/tests/UnitTests/framework/index.php @@ -23,7 +23,7 @@ class TestFolder } else if(is_file($fullpath) && strncmp($entry,'ut',2)===0) { - $this->testFiles[$entry]="$rootUri?target=".strtr(substr($fullpath,strlen($rootPath)+1),"\\",'/'); + $this->testFiles[$entry]="$rootUri/index.php?target=".strtr(substr($fullpath,strlen($rootPath)+1),"\\",'/'); } } closedir($dir); @@ -65,20 +65,22 @@ if(isset($_GET['target'])) $fullpath=realpath("$rootPath/$target"); if($fullpath===false || strpos($fullpath,$rootPath)!==0) die('invalid test target'); - - require_once($rootPath.'/common.php'); - + include_once($rootPath.'/common.php'); + if(is_dir($fullpath)) { + $test=new GroupTest(basename($rootPath)."/$target"); addTests($test,$fullpath,$recursive); - $test->run(new HtmlReporterWithCoverage(__FILE__,$rootPath)); + $test->run(new HtmlReporter()); + //$test->run(new HtmlReporterWithCoverage('index.php',$rootPath)); } else { $testClass=basename($fullpath,'.php'); - require_once($fullpath); + include_once($fullpath); $test=new $testClass(basename($rootPath)."/$target"); + $test->run(new HtmlReporter()); } } -- cgit v1.2.3