From 17f49a9bc71d88c9b3e2f31a161f3689c136ac16 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 1 Dec 2006 12:28:55 +0000 Subject: merge from 3.0 branch till 1531. --- tests/test_tools/unit_tests.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/test_tools/unit_tests.php') diff --git a/tests/test_tools/unit_tests.php b/tests/test_tools/unit_tests.php index 732c6826..e62c2996 100644 --- a/tests/test_tools/unit_tests.php +++ b/tests/test_tools/unit_tests.php @@ -42,7 +42,7 @@ class TestFolder if(!empty($folder->subFolders) || !empty($folder->testFiles)) $this->subFolders[]=$folder; } - else if(is_file($fullpath) && (strncmp($entry,'ut',2)===0 + else if(is_file($fullpath) && (strncmp($entry,'ut',2)===0 || preg_match('/test.*\.php/', strtolower($entry)))) { $this->testFiles[$entry]="$rootUri/$script?target=".strtr(substr($fullpath,strlen($rootPath)+1),"\\",'/'); @@ -65,14 +65,15 @@ class TestFolder class PradoUnitTester { private $_root; - + function __construct($root, $app_dir) { $this->_root = $root; + Prado::setPathOfAlias('Tests', $root); $app = new TMockApplication($app_dir); $app->run(); } - + function addTests($test,$path,$recursive) { $dir=opendir($path); @@ -127,8 +128,8 @@ class PradoUnitTester $root=new TestFolder($rootPath,$rootPath,$rootUri); echo $root->getHtml(); echo "\n"; - } - } + } + } } ?> \ No newline at end of file -- cgit v1.2.3