compatibility.php 1004 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /*
  3. * Ensures compatibility with PHPUnit < 6.x
  4. */
  5. namespace PHPUnit\Framework\Constraint {
  6. if (!class_exists('PHPUnit\Framework\Constraint\Constraint') && class_exists('PHPUnit_Framework_Constraint')) {
  7. abstract class Constraint extends \PHPUnit_Framework_Constraint
  8. {
  9. }
  10. }
  11. }
  12. namespace PHPUnit\Framework {
  13. if (!class_exists('PHPUnit\Framework\TestCase') && class_exists('PHPUnit_Framework_TestCase')) {
  14. abstract class TestCase extends \PHPUnit_Framework_TestCase
  15. {
  16. /**
  17. * @param string $exception
  18. */
  19. public function expectException($exception)
  20. {
  21. $this->setExpectedException($exception);
  22. }
  23. /**
  24. * @param string $message
  25. */
  26. public function expectExceptionMessage($message)
  27. {
  28. $this->setExpectedException($this->getExpectedException(), $message);
  29. }
  30. }
  31. }
  32. }