summaryrefslogtreecommitdiff
path: root/tests/test_tools/unit_tests.php
diff options
context:
space:
mode:
authorwei <>2006-11-28 23:34:00 +0000
committerwei <>2006-11-28 23:34:00 +0000
commitf4925fce58f1827515ced2c32bb12f2aa977a1f2 (patch)
treeb577eaaf872cd9d640f3ea8783fb4c898ca0ca57 /tests/test_tools/unit_tests.php
parent51fe975484bb4d1e8e63f4438c1c8e7f1b41c5df (diff)
Make simpletest E_STRICT compatible
Diffstat (limited to 'tests/test_tools/unit_tests.php')
-rw-r--r--tests/test_tools/unit_tests.php11
1 files changed, 6 insertions, 5 deletions
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 "</body>\n</html>";
- }
- }
+ }
+ }
}
?> \ No newline at end of file