summaryrefslogtreecommitdiff
path: root/buildscripts/phing/tasks/PradoSimpleTestTask.php
diff options
context:
space:
mode:
authorwei <>2007-05-16 01:54:57 +0000
committerwei <>2007-05-16 01:54:57 +0000
commitc5acb6c053ddf7428c0a56af61e26732a51685d4 (patch)
treec89d6ce111845c1571f55b2999145748b9282f40 /buildscripts/phing/tasks/PradoSimpleTestTask.php
parentf52dd35b28701da6ca62b9d8bde059fcc9974104 (diff)
update phing simpletest task
Diffstat (limited to 'buildscripts/phing/tasks/PradoSimpleTestTask.php')
-rw-r--r--buildscripts/phing/tasks/PradoSimpleTestTask.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/buildscripts/phing/tasks/PradoSimpleTestTask.php b/buildscripts/phing/tasks/PradoSimpleTestTask.php
new file mode 100644
index 00000000..4d6317b5
--- /dev/null
+++ b/buildscripts/phing/tasks/PradoSimpleTestTask.php
@@ -0,0 +1,40 @@
+<?php
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/simpletest/SimpleTestTask.php';
+
+/**
+ * Task to run PRADO unit tests
+ */
+class PradoSimpleTestTask extends SimpleTestTask
+{
+ private $_appdir;
+
+ public function setAppdir($value)
+ {
+ $this->_appdir=$value;
+ }
+
+ function init()
+ {
+ $tools= realpath(dirname(__FILE__).'/../../../tests/test_tools/');
+ include_once "$tools/unit_tests.php";
+
+ if (!class_exists('SimpleReporter',false))
+ throw new BuildException("SimpleTestTask depends on SimpleTest package being installed.", $this->getLocation());
+
+ require_once 'phing/tasks/ext/simpletest/SimpleTestCountResultFormatter.php';
+ require_once 'phing/tasks/ext/simpletest/SimpleTestFormatterElement.php';
+ }
+
+ function main()
+ {
+ if($this->_appdir)
+ {
+ $app = new TShellApplication($this->_appdir);
+ $app->run();
+ }
+ parent::main();
+ }
+}
+
+?> \ No newline at end of file