Skip to content

Commit cacb698

Browse files
staabmondrejmirtes
authored andcommitted
Removed dead test-code after min-phpversion raise
1 parent 46c7243 commit cacb698

3 files changed

+0
-68
lines changed

tests/Rule/Nette/PresenterInjectedPropertiesExtensionTest.php

-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
namespace PHPStan\Rule\Nette;
44

55
use PHPStan\Testing\LevelsTestCase;
6-
use const PHP_VERSION_ID;
76

87
class PresenterInjectedPropertiesExtensionTest extends LevelsTestCase
98
{
109

1110
public static function dataTopics(): array
1211
{
13-
if (PHP_VERSION_ID < 70400) {
14-
self::markTestSkipped('Only for PHP 7.4+');
15-
}
16-
1712
return [
1813
['presenterInject'],
1914
];

tests/Rule/Nette/RegularExpressionPatternRuleTest.php

-57
Original file line numberDiff line numberDiff line change
@@ -18,65 +18,8 @@ protected function getRule(): Rule
1818
return new RegularExpressionPatternRule();
1919
}
2020

21-
public function testValidRegexPatternBefore73(): void
22-
{
23-
if (PHP_VERSION_ID >= 70300) {
24-
self::markTestSkipped('This test requires PHP < 7.3.0');
25-
}
26-
27-
$this->analyse(
28-
[__DIR__ . '/data/valid-regex-pattern.php'],
29-
[
30-
[
31-
'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok',
32-
6,
33-
],
34-
[
35-
'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~',
36-
7,
37-
],
38-
[
39-
'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok',
40-
11,
41-
],
42-
[
43-
'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~',
44-
12,
45-
],
46-
[
47-
'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok',
48-
16,
49-
],
50-
[
51-
'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~',
52-
17,
53-
],
54-
[
55-
'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok',
56-
21,
57-
],
58-
[
59-
'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~',
60-
22,
61-
],
62-
[
63-
'Regex pattern is invalid: Delimiter must not be alphanumeric or backslash in pattern: nok',
64-
26,
65-
],
66-
[
67-
'Regex pattern is invalid: Compilation failed: missing ) at offset 1 in pattern: ~(~',
68-
26,
69-
],
70-
],
71-
);
72-
}
73-
7421
public function testValidRegexPatternAfter73(): void
7522
{
76-
if (PHP_VERSION_ID < 70300) {
77-
self::markTestSkipped('This test requires PHP >= 7.3.0');
78-
}
79-
8023
$messagePart = 'alphanumeric or backslash';
8124
if (PHP_VERSION_ID >= 80200) {
8225
$messagePart = 'alphanumeric, backslash, or NUL';

tests/Type/Nette/StringsMatchDynamicReturnTypeExtensionTest.php

-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace PHPStan\Type\Nette;
44

55
use PHPStan\Testing\TypeInferenceTestCase;
6-
use const PHP_VERSION_ID;
76

87
class StringsMatchDynamicReturnTypeExtensionTest extends TypeInferenceTestCase
98
{
@@ -14,11 +13,6 @@ class StringsMatchDynamicReturnTypeExtensionTest extends TypeInferenceTestCase
1413
public function dataFileAsserts(): iterable
1514
{
1615
yield from self::gatherAssertTypes(__DIR__ . '/data/strings-match.php');
17-
18-
if (PHP_VERSION_ID < 70400) {
19-
return;
20-
}
21-
2216
yield from self::gatherAssertTypes(__DIR__ . '/data/strings-match-74.php');
2317
}
2418

0 commit comments

Comments
 (0)