Skip to content

Commit a2a8633

Browse files
committed
Update tests to account for incorrect non static access usage
1 parent a083f41 commit a2a8633

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/PHPStan/Rules/Properties/AccessPropertiesRuleTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public function testAccessProperties(): void
4646
'Access to private property $foo of parent class TestAccessProperties\FooAccessProperties.',
4747
27,
4848
],
49+
[
50+
'Non static access to static property TestAccessProperties\FooAccessProperties::$staticFoo.',
51+
28,
52+
],
4953
[
5054
'Cannot access property $propertyOnString on string.',
5155
35,
@@ -198,6 +202,10 @@ public function testAccessPropertiesWithoutUnionTypes(): void
198202
'Access to private property $foo of parent class TestAccessProperties\FooAccessProperties.',
199203
27,
200204
],
205+
[
206+
'Non static access to static property TestAccessProperties\FooAccessProperties::$staticFoo.',
207+
28,
208+
],
201209
[
202210
'Cannot access property $propertyOnString on string.',
203211
35,
@@ -340,6 +348,10 @@ public function testAccessPropertiesOnThisOnly(): void
340348
'Access to private property $foo of parent class TestAccessProperties\FooAccessProperties.',
341349
27,
342350
],
351+
[
352+
'Non static access to static property TestAccessProperties\FooAccessProperties::$staticFoo.',
353+
28,
354+
],
343355
],
344356
);
345357
}

0 commit comments

Comments
 (0)