methodThatGeneratesAnException(); $this->fail("Exception was expected."); } catch (Exception $e) { $this->pass(); } //Expectation 2 try { $foo->methodThatGeneratesAnException(); $this->fail("Exception was expected."); } catch (Exception $e) { $this->pass(); } }//end of single test method }//end of test class /** Code Snippet Related to: How to Test for Expected Exception Thrown in Simpletest - *The* Answer See: http://www.eatmybusiness.com/food/2010/01/16/how-to-test-for-expected-exception-thrown-in-simpletest-the-answer/139/ **/