[eluser]gon[/eluser]
This works if you have simpletest in your php.ini include_path.
Code:
<?php
require_once("unit_tester.php");
require_once('reporter.php');
class Test extends Controller {
function Test()
{
parent::Controller();
$this->test =& new TestSuite('AllTests');
$this->test->addTestFile(APPPATH.'test/testXMLBaseParser.php');
$this->test->addTestFile(APPPATH.'test/testReslib.php');
$this->test->addTestFile(APPPATH.'test/testPurchaseCancellationPolicyMethods.php');
$this->test->addTestFile(APPPATH.'test/testPurchaseCancellationPolicyFixture1.php');
$this->test->addTestFile(APPPATH.'test/testPurchaseCancellationPolicyFixture2.php');
$this->test->addTestFile(APPPATH.'test/testPurchaseCancellationPolicyFixture3.php');
$this->test->addTestFile(APPPATH.'test/testPurchaseCancellationPolicyFixture4.php');
$this->test->addTestFile(APPPATH.'test/testPurchaseCancellationPolicyFixture5.php');
// ... lots of test classes
}
function index(){
$this->test->run(new HtmlReporter());
}
function text() {
$this->test->run(new TextReporter());
}
function xml() {
$this->test->run(new XmlReporter());
}
}
?>