PhpUnit8CompatTrait.php 479 B

12345678910111213141516171819202122
  1. <?php
  2. namespace PhpZip\Tests\Polyfill;
  3. use PHPUnit\Runner\Version;
  4. trait PhpUnit8CompatTrait
  5. {
  6. /**
  7. * @param string $regularExpression
  8. */
  9. public function expectExceptionMessageMatches(string $regularExpression): void
  10. {
  11. if (version_compare(Version::id(), '8.0.0', '<')) {
  12. $this->expectExceptionMessageRegExp($regularExpression);
  13. return;
  14. }
  15. parent::expectExceptionMessageMatches($regularExpression);
  16. }
  17. }