title: Testing for multiple exceptions using phpunit
body: <p>I'm new to unit testing and have written the following test:</p>
  
  <pre><code>/**
   * @expectedException Exception
   */
  public function testCantGetInvalidCampsite() {
      $invalidIds = array(300000, "string");
      foreach($invalidIds as $id) {
          $this-&gt;campsites-&gt;getCampsite($id); // will throw an exception
      }
  }
  </code></pre>
  
  <p>I'm not sure though if this is actually testing all the invalid ids, or just stopping as soon as it hits the first exception. Is this how I should be testing for multiple exceptions or do I need to split this up into a number of different tests, or is there another way I should do it?</p>
  
  <p>Also, if my exception message is generated dynamically eg "Could not retrieve record with id 30000", how do I test that the correct dynamic message is being produced?</p>