title: PHPUnit - Testing for cases that are not handled by the base function
body: <p>I have a query about PHPUnit. How do I create a test case in PHPUnit for cases that are NOT handled in the base class itself. For example, Please Consider the following showMessage method. </p>
  
  <pre><code>Class Message
  {
  
      public function showMessage($type = 1)
      {
  
          if(1 == $type){
              return 'Success';
          }elseif(2 == $type){
              return 'ERROR';
          }
  
      }
  
  }
  </code></pre>
  
  <p>In the showMessage method above, there should also be a case that if the <code>$type</code> is anything other than 1 or 2, so it should have a else case, so the conditions should be something like </p>
  
  <pre><code>    if(1 == $type){
          return 'Success';
      }elseif(2 == $type){
          return 'ERROR';
      }else{
          return 'UNKNOWN';
      }
  </code></pre>
  
  <p>Thanks for any inputs</p>