diff --git a/tests/Rule/Nette/PresenterInjectedPropertiesExtensionTest.php b/tests/Rule/Nette/PresenterInjectedPropertiesExtensionTest.php index 5ccd35f..f9059b7 100644 --- a/tests/Rule/Nette/PresenterInjectedPropertiesExtensionTest.php +++ b/tests/Rule/Nette/PresenterInjectedPropertiesExtensionTest.php @@ -3,17 +3,12 @@ namespace PHPStan\Rule\Nette; use PHPStan\Testing\LevelsTestCase; -use const PHP_VERSION_ID; class PresenterInjectedPropertiesExtensionTest extends LevelsTestCase { public static function dataTopics(): array { - if (PHP_VERSION_ID < 70400) { - self::markTestSkipped('Only for PHP 7.4+'); - } - return [ ['presenterInject'], ]; diff --git a/tests/Rule/Nette/RegularExpressionPatternRuleTest.php b/tests/Rule/Nette/RegularExpressionPatternRuleTest.php index b1f1cac..86ae8bd 100644 --- a/tests/Rule/Nette/RegularExpressionPatternRuleTest.php +++ b/tests/Rule/Nette/RegularExpressionPatternRuleTest.php @@ -18,65 +18,8 @@ protected function getRule(): Rule return new RegularExpressionPatternRule(); } - public function testValidRegexPatternBefore73(): void - { - if (PHP_VERSION_ID >= 70300) { - self::markTestSkipped('This test requires PHP < 7.3.0'); - } - - $this->analyse( - [__DIR__ . '/data/valid-regex-pattern.php'], - [ - [ - 'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok', - 6, - ], - [ - 'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~', - 7, - ], - [ - 'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok', - 11, - ], - [ - 'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~', - 12, - ], - [ - 'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok', - 16, - ], - [ - 'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~', - 17, - ], - [ - 'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok', - 21, - ], - [ - 'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~', - 22, - ], - [ - 'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok', - 26, - ], - [ - 'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~', - 26, - ], - ], - ); - } - public function testValidRegexPatternAfter73(): void { - if (PHP_VERSION_ID < 70300) { - self::markTestSkipped('This test requires PHP >= 7.3.0'); - } - $messagePart = 'alphanumeric or backslash'; if (PHP_VERSION_ID >= 80200) { $messagePart = 'alphanumeric, backslash, or NUL'; diff --git a/tests/Type/Nette/StringsMatchDynamicReturnTypeExtensionTest.php b/tests/Type/Nette/StringsMatchDynamicReturnTypeExtensionTest.php index 1b5d47b..a503824 100644 --- a/tests/Type/Nette/StringsMatchDynamicReturnTypeExtensionTest.php +++ b/tests/Type/Nette/StringsMatchDynamicReturnTypeExtensionTest.php @@ -3,7 +3,6 @@ namespace PHPStan\Type\Nette; use PHPStan\Testing\TypeInferenceTestCase; -use const PHP_VERSION_ID; class StringsMatchDynamicReturnTypeExtensionTest extends TypeInferenceTestCase { @@ -14,11 +13,6 @@ class StringsMatchDynamicReturnTypeExtensionTest extends TypeInferenceTestCase public function dataFileAsserts(): iterable { yield from self::gatherAssertTypes(__DIR__ . '/data/strings-match.php'); - - if (PHP_VERSION_ID < 70400) { - return; - } - yield from self::gatherAssertTypes(__DIR__ . '/data/strings-match-74.php'); }