File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/Symfony/Component/Config/Tests/Resource Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,26 @@ public function provideHashedSignature()
136
136
yield [0 , 15 , '' ];
137
137
}
138
138
139
+ /**
140
+ * Typed properties without a default value are undefined,
141
+ * make sure this doesn't throw an error when generating a signature.
142
+ *
143
+ * @depends testHashedSignature
144
+ * @dataProvider provideTypedProperties
145
+ * @requires PHP >= 7.4
146
+ */
147
+ public function testTypedProperies ($ changeExpected , $ changedLine , $ changedCode )
148
+ {
149
+ $ this ->testHashedSignature ($ changeExpected , $ changedLine , $ changedCode );
150
+ }
151
+
152
+ public function provideTypedProperties ()
153
+ {
154
+ yield [1 , 5 , 'public array $pub; ' ];
155
+ yield [0 , 7 , 'protected int $prot; ' ];
156
+ yield [0 , 9 , 'private string $priv; ' ];
157
+ }
158
+
139
159
public function testEventSubscriber ()
140
160
{
141
161
$ res = new ReflectionClassResource (new \ReflectionClass (TestEventSubscriber::class));
You can’t perform that action at this time.
0 commit comments