=9) && ($phpUnitMinorVersion >=1)); */ if (method_exists(TestCase::class, 'assertDoesNotMatchRegularExpression')) { $this->assertDoesNotMatchRegularExpression($arg1, $arg2); } else { $this->assertNotRegExp($arg1, $arg2); } } public function assertMatchesRegularExpression2($arg1, $arg2) { // https://stackoverflow.com/questions/4837748/how-to-detect-version-of-phpunit if (method_exists(TestCase::class, 'assertMatchesRegularExpression')) { $this->assertMatchesRegularExpression($arg1, $arg2); } else { $this->assertRegExp($arg1, $arg2); } } }