Skip to content

Commit c673da2

Browse files
committed
All tests can run on PHP 7.2 again
1 parent da7e882 commit c673da2

File tree

2 files changed

+26
-33
lines changed

2 files changed

+26
-33
lines changed

tests/Reflection/Nette/NetteObjectClassReflectionExtensionTest.php

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,16 @@ public function dataHasMethod(): array
3333
'onProtectedEvent',
3434
false,
3535
];
36-
if (PHP_VERSION_ID < 70200) { // PHP 7.2 is incompatible with Nette\Object.
37-
$data[] = [
38-
'PHPStan\NetteObjectChild',
39-
'onPublicEvent',
40-
true,
41-
];
42-
$data[] = [
43-
'PHPStan\NetteObjectChild',
44-
'onProtectedEvent',
45-
false,
46-
];
47-
}
36+
$data[] = [
37+
'PHPStan\NetteObjectChild',
38+
'onPublicEvent',
39+
true,
40+
];
41+
$data[] = [
42+
'PHPStan\NetteObjectChild',
43+
'onProtectedEvent',
44+
false,
45+
];
4846
return $data;
4947
}
5048

@@ -71,23 +69,22 @@ public function dataHasProperty(): array
7169
'foo',
7270
false,
7371
];
74-
if (PHP_VERSION_ID < 70200) { // PHP 7.2 is incompatible with Nette\Object.
75-
$data[] = [
76-
'PHPStan\NetteObjectChild',
77-
'staticProperty',
78-
false,
79-
];
80-
$data[] = [
81-
'PHPStan\NetteObjectChild',
82-
'publicProperty',
83-
true,
84-
];
85-
$data[] = [
86-
'PHPStan\NetteObjectChild',
87-
'protectedProperty',
88-
false,
89-
];
90-
}
72+
$data[] = [
73+
'PHPStan\NetteObjectChild',
74+
'staticProperty',
75+
false,
76+
];
77+
$data[] = [
78+
'PHPStan\NetteObjectChild',
79+
'publicProperty',
80+
true,
81+
];
82+
$data[] = [
83+
'PHPStan\NetteObjectChild',
84+
'protectedProperty',
85+
false,
86+
];
87+
9188
return $data;
9289
}
9390

tests/Rule/Nette/DoNotExtendNetteObjectRuleTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ public function testSmartObjectChild(): void
1919

2020
public function testNetteObjectChild(): void
2121
{
22-
if (PHP_VERSION_ID >= 70200) {
23-
self::markTestSkipped('PHP 7.2 is incompatible with Nette\Object.');
24-
}
25-
2622
$this->analyse([__DIR__ . '/../../NetteObjectChild.php'], [
2723
[
2824
'Class PHPStan\NetteObjectChild extends Nette\Object - it\'s better to use Nette\SmartObject trait.',

0 commit comments

Comments
 (0)