TestCase.php 737 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Codeception\PHPUnit;
  3. abstract class TestCase extends \PHPUnit\Framework\TestCase
  4. {
  5. protected function setUp()
  6. {
  7. if (method_exists($this, '_setUp')) {
  8. $this->_setUp();
  9. }
  10. }
  11. protected function tearDown()
  12. {
  13. if (method_exists($this, '_tearDown')) {
  14. $this->_tearDown();
  15. }
  16. }
  17. public static function setUpBeforeClass()
  18. {
  19. if (method_exists(get_called_class(), '_setUpBeforeClass')) {
  20. static::_setUpBeforeClass();
  21. }
  22. }
  23. public static function tearDownAfterClass()
  24. {
  25. if (method_exists(get_called_class(), '_tearDownAfterClass')) {
  26. static::_tearDownAfterClass();
  27. }
  28. }
  29. }