shim.php 668 B

123456789101112131415161718192021
  1. <?php
  2. // @codingStandardsIgnoreStart
  3. // Add aliases for PHPUnit 6
  4. namespace {
  5. if (!class_exists('PHPUnit_Framework_Assert')) {
  6. class_alias('PHPUnit\Framework\Assert', 'PHPUnit_Framework_Assert');
  7. }
  8. if (!class_exists('PHPUnit_Framework_TestCase')) {
  9. class_alias('PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase');
  10. }
  11. if (!class_exists('PHPUnit\Util\Log\JSON') || !class_exists('PHPUnit\Util\Log\TAP')) {
  12. if (class_exists('PHPUnit\Util\Printer')) {
  13. require_once __DIR__ . '/phpunit5-loggers.php'; // TAP and JSON loggers were removed in PHPUnit 6
  14. }
  15. }
  16. }
  17. // @codingStandardsIgnoreEnd