Welcome Guest, Not a member yet? Register   Sign In
codeigniter + simple test???
#4

[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());
    }    
    
}
?>


Messages In This Thread
codeigniter + simple test??? - by El Forum - 01-05-2009, 03:44 AM
codeigniter + simple test??? - by El Forum - 01-20-2009, 12:32 AM
codeigniter + simple test??? - by El Forum - 01-20-2009, 08:04 AM
codeigniter + simple test??? - by El Forum - 01-20-2009, 08:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB