title: PHPUnit - is this the correct way
body: <p>I am staring out with PHPUnit today. As i use Yii framework i am using the built in functions.</p>
  
  <p>Can someone let me know if i am proceeding correctly</p>
  
  <p>Here is the model function</p>
  
  <pre><code>public function getTaxRate()
  {
      if($this-&gt;province_id != 13 &amp;&amp; $this-&gt;province_id != 14)
      {
          return 21;
      }
      elseif($this-&gt;identification[0] == 'B')
      {
          return 0;       
      }
      else
      {
          return 7;       
      }
  
  } 
  </code></pre>
  
  <p>Here is the test case</p>
  
  <pre><code>public function testgetTaxRate()
  {
      $accountData = array(
                                  array('identification'=&gt;'x2', 'province_id'=&gt;'50', 'result'=&gt;21), // test for 21
                                  array('identification'=&gt;'x2', 'province_id'=&gt;'13', 'result'=&gt;7), // test for 7
                                  array('identification'=&gt;'B2', 'province_id'=&gt;'13', 'result'=&gt;0), // test for 0
                          );
      foreach($accountData as $account)
      {
          $acc = new Accounts();
          $acc-&gt;identification=$account['identification'];
          $acc-&gt;province_id=$account['province_id'];
          $tax = $acc-&gt;getTaxRate();
          $this-&gt;assertEquals($tax, $account['result']);
      }
  }
  </code></pre>
  
  <p>Am I doing this correctly, The result is correct and it errors when I expect it to.</p>
  
  <p>Regards</p>