@after

@after 标注用于指明此方法应当在测试用例类中的每个测试方法运行完成之后调用。

  1. class MyTest extends PHPUnit_Framework_TestCase
  2. {
  3. /**
  4. * @after
  5. */
  6. public function tearDownSomeFixtures()
  7. {
  8. // ...
  9. }
  10.  
  11. /**
  12. * @after
  13. */
  14. public function tearDownSomeOtherFixtures()
  15. {
  16. // ...
  17. }
  18. }