title: How do I use PHPUnit with CodeIgniter?
body: <p>I have read and read articles on PHPUnit, SimpleTest, and other Unit Testing frameworks. They all sound so great! I finally got PHPUnit working with Codeigniter thanks to <a href="https://bitbucket.org/kenjis/my-ciunit/overview">https://bitbucket.org/kenjis/my-ciunit/overview</a></p>
  
  <p>Now my question is, how do I use it?</p>
  
  <p>Every tutorial I see has some abstract use like <code>assertEquals(2, 1+1)</code> or:</p>
  
  <pre><code>public function testSpeakWithParams()
  {
      $hello = new SayHello('Marco');
      $this-&gt;assertEquals("Hello Marco!", $hello-&gt;speak());
  }
  </code></pre>
  
  <p>That is great if I had a function that would output such a predictable string. Usually my apps grab a bunch of data from the database then display it in some sort of table. So how do I test Codeigniter's controllers? </p>
  
  <p>I would like to do Test-Driven Development and I have read the tutorial on PHPUnits site, but once again the example seem so abstract. Most of my codeigniter functions are displaying data.</p>
  
  <p>Is there a book or a great tutorial with a practical application and examples of PHPUnit testing?</p>