Welcome Guest, Not a member yet? Register   Sign In
Anyone here uses foostack CIUnit Testing?
#1

[eluser]kikz4life[/eluser]
Is there anyone here used :CIUnit http://foostack.com/foostack

Having trouble understanding it. T_T.

What I'm doing is pretty simple

E.g
Code:
I have a controller method
function myphp()
{
   echo 'boom';
}

CI Unit Testing:
    public function setUp()
    {
        // Set the tested controller
        $this->CI = set_controller('home');
               // date_default_timezone_set('America/Los_Angeles');
    }


    function testMyPhp()
    {
        $this->CI->myphp();
        
        $out = output();
        var_dump($out); //return empty eventhough function myphp is returning a string ('boom')
    }

What happening.?? I just to test whether I can fetch the output of my method myphp.




Theme © iAndrew 2016 - Forum software by © MyBB