HosipLan

Untitled

Jun 5th, 2011
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. /**
  2.  * with annotation
  3.  *
  4.  * @expectedException MyException
  5.  */
  6. public function testTextException()
  7. {
  8.     $this->model->operation();
  9. }
  10.  
  11.  
  12. /**
  13.  * without annotation
  14.  */
  15. public function testTextException()
  16. {
  17.         try {
  18.         $this->model->operation();
  19.  
  20.         } catch (MyException $e) {
  21.             return;
  22.         }
  23.  
  24.         $this->fail('Excepected exception MyException.');
  25. }
Advertisement
Add Comment
Please, Sign In to add comment