Base.php 547 B

1234567891011121314151617181920
  1. <?php
  2. declare(strict_types=1);
  3. namespace tests;
  4. use PHPUnit\Framework\TestCase;
  5. use PHPUnit\Runner\Version;
  6. use function version_compare;
  7. class Base extends TestCase
  8. {
  9. protected function proxyAssertMatchesRegularExpression(string $pattern, string $string, string $message = '')
  10. {
  11. if (version_compare(Version::id(), '9.1', '>=')) {
  12. $this->assertMatchesRegularExpression($pattern, $string, $message);
  13. } else {
  14. $this->assertRegExp($pattern, $string, $message);
  15. }
  16. }
  17. }