CodeIgniter Forums
Anyone here uses foostack CIUnit Testing? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Anyone here uses foostack CIUnit Testing? (/showthread.php?tid=53639)



Anyone here uses foostack CIUnit Testing? - El Forum - 08-01-2012

[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.