@@ -20,6 +20,7 @@ protected function createReflectionClassMock(): MockObject
20
20
'getShortName ' ,
21
21
'getName ' ,
22
22
'getDocComment ' ,
23
+ 'getAttributes ' ,
23
24
'isInterface ' ,
24
25
'isTrait ' ,
25
26
'isAbstract ' ,
@@ -46,6 +47,7 @@ public function testSimpleClass(): void
46
47
$ reflectionClass ->method ('getShortName ' )->willReturn ('TestClass ' );
47
48
$ reflectionClass ->method ('getName ' )->willReturn ('vendor\library\TestStuff\TestClass ' );
48
49
$ reflectionClass ->method ('getDocComment ' )->willReturn (false );
50
+ $ reflectionClass ->method ('getAttributes ' )->willReturn ([]);
49
51
$ reflectionClass ->method ('isInterface ' )->willReturn (false );
50
52
$ reflectionClass ->method ('isTrait ' )->willReturn (false );
51
53
$ reflectionClass ->method ('isAbstract ' )->willReturn (false );
@@ -77,6 +79,7 @@ public function testSimpleInterface(): void
77
79
$ reflectionClass ->method ('getShortName ' )->willReturn ('TestInterface ' );
78
80
$ reflectionClass ->method ('getName ' )->willReturn ('vendor\library\TestStuff\TestInterface ' );
79
81
$ reflectionClass ->method ('getDocComment ' )->willReturn (false );
82
+ $ reflectionClass ->method ('getAttributes ' )->willReturn ([]);
80
83
$ reflectionClass ->method ('isInterface ' )->willReturn (true );
81
84
$ reflectionClass ->method ('isTrait ' )->willReturn (false );
82
85
$ reflectionClass ->method ('isAbstract ' )->willReturn (false );
@@ -109,6 +112,7 @@ public function testSimpleTrait(): void
109
112
$ reflectionClass ->method ('getShortName ' )->willReturn ('TestTrait ' );
110
113
$ reflectionClass ->method ('getName ' )->willReturn ('vendor\library\TestStuff\TestTrait ' );
111
114
$ reflectionClass ->method ('getDocComment ' )->willReturn (false );
115
+ $ reflectionClass ->method ('getAttributes ' )->willReturn ([]);
112
116
$ reflectionClass ->method ('isInterface ' )->willReturn (false );
113
117
$ reflectionClass ->method ('isTrait ' )->willReturn (true );
114
118
$ reflectionClass ->method ('isAbstract ' )->willReturn (false );
@@ -141,6 +145,7 @@ public function testSimpleAbstract(): void
141
145
$ reflectionClass ->method ('getShortName ' )->willReturn ('TestAbstract ' );
142
146
$ reflectionClass ->method ('getName ' )->willReturn ('vendor\library\TestStuff\TestAbstract ' );
143
147
$ reflectionClass ->method ('getDocComment ' )->willReturn (false );
148
+ $ reflectionClass ->method ('getAttributes ' )->willReturn ([]);
144
149
$ reflectionClass ->method ('isInterface ' )->willReturn (false );
145
150
$ reflectionClass ->method ('isTrait ' )->willReturn (false );
146
151
$ reflectionClass ->method ('isAbstract ' )->willReturn (true );
@@ -173,6 +178,7 @@ public function testSimpleFinal(): void
173
178
$ reflectionClass ->method ('getShortName ' )->willReturn ('TestFinal ' );
174
179
$ reflectionClass ->method ('getName ' )->willReturn ('vendor\library\TestStuff\TestFinal ' );
175
180
$ reflectionClass ->method ('getDocComment ' )->willReturn (false );
181
+ $ reflectionClass ->method ('getAttributes ' )->willReturn ([]);
176
182
$ reflectionClass ->method ('isInterface ' )->willReturn (false );
177
183
$ reflectionClass ->method ('isTrait ' )->willReturn (false );
178
184
$ reflectionClass ->method ('isAbstract ' )->willReturn (false );
@@ -205,6 +211,7 @@ public function testComplexClass(): void
205
211
$ interfaceFromParent ->method ('getShortName ' )->willReturn ('AnotherInterface ' );
206
212
$ interfaceFromParent ->method ('getName ' )->willReturn ('vendor\library\TestStuff\AnotherInterface ' );
207
213
$ interfaceFromParent ->method ('getDocComment ' )->willReturn (false );
214
+ $ interfaceFromParent ->method ('getAttributes ' )->willReturn ([]);
208
215
$ interfaceFromParent ->method ('isInterface ' )->willReturn (true );
209
216
$ interfaceFromParent ->method ('isTrait ' )->willReturn (false );
210
217
$ interfaceFromParent ->method ('isAbstract ' )->willReturn (false );
@@ -220,6 +227,7 @@ public function testComplexClass(): void
220
227
$ parent ->method ('getShortName ' )->willReturn ('AnotherClass ' );
221
228
$ parent ->method ('getName ' )->willReturn ('vendor\library\TestStuff\AnotherClass ' );
222
229
$ parent ->method ('getDocComment ' )->willReturn (false );
230
+ $ parent ->method ('getAttributes ' )->willReturn ([]);
223
231
$ parent ->method ('isInterface ' )->willReturn (false );
224
232
$ parent ->method ('isTrait ' )->willReturn (false );
225
233
$ parent ->method ('isAbstract ' )->willReturn (false );
@@ -237,6 +245,7 @@ public function testComplexClass(): void
237
245
$ interfaceFromInterface ->method ('getShortName ' )->willReturn ('SomeOtherInterface ' );
238
246
$ interfaceFromInterface ->method ('getName ' )->willReturn ('vendor\library\TestStuff\SomeOtherInterface ' );
239
247
$ interfaceFromInterface ->method ('getDocComment ' )->willReturn (false );
248
+ $ interfaceFromInterface ->method ('getAttributes ' )->willReturn ([]);
240
249
$ interfaceFromInterface ->method ('isInterface ' )->willReturn (true );
241
250
$ interfaceFromInterface ->method ('isTrait ' )->willReturn (false );
242
251
$ interfaceFromInterface ->method ('isAbstract ' )->willReturn (false );
@@ -252,6 +261,7 @@ public function testComplexClass(): void
252
261
$ interfaceA ->method ('getShortName ' )->willReturn ('InterfaceA ' );
253
262
$ interfaceA ->method ('getName ' )->willReturn ('vendor\library\TestStuff\InterfaceA ' );
254
263
$ interfaceA ->method ('getDocComment ' )->willReturn (false );
264
+ $ interfaceA ->method ('getAttributes ' )->willReturn ([]);
255
265
$ interfaceA ->method ('isInterface ' )->willReturn (true );
256
266
$ interfaceA ->method ('isTrait ' )->willReturn (false );
257
267
$ interfaceA ->method ('isAbstract ' )->willReturn (false );
@@ -269,6 +279,7 @@ public function testComplexClass(): void
269
279
$ interfaceB ->method ('getShortName ' )->willReturn ('InterfaceB ' );
270
280
$ interfaceB ->method ('getName ' )->willReturn ('vendor\library\TestStuff\InterfaceB ' );
271
281
$ interfaceB ->method ('getDocComment ' )->willReturn (false );
282
+ $ interfaceB ->method ('getAttributes ' )->willReturn ([]);
272
283
$ interfaceB ->method ('isInterface ' )->willReturn (true );
273
284
$ interfaceB ->method ('isTrait ' )->willReturn (false );
274
285
$ interfaceB ->method ('isAbstract ' )->willReturn (false );
@@ -294,6 +305,7 @@ public function testComplexClass(): void
294
305
*/
295
306
EOT
296
307
);
308
+ $ reflectionClass ->method ('getAttributes ' )->willReturn ([]);
297
309
$ reflectionClass ->method ('isInterface ' )->willReturn (false );
298
310
$ reflectionClass ->method ('isTrait ' )->willReturn (false );
299
311
$ reflectionClass ->method ('isAbstract ' )->willReturn (false );
@@ -340,6 +352,7 @@ public function testComplexInterface(): void
340
352
$ interfaceFromInterface ->method ('getShortName ' )->willReturn ('SomeOtherInterface ' );
341
353
$ interfaceFromInterface ->method ('getName ' )->willReturn ('vendor\library\TestStuff\SomeOtherInterface ' );
342
354
$ interfaceFromInterface ->method ('getDocComment ' )->willReturn (false );
355
+ $ interfaceFromInterface ->method ('getAttributes ' )->willReturn ([]);
343
356
$ interfaceFromInterface ->method ('isInterface ' )->willReturn (true );
344
357
$ interfaceFromInterface ->method ('isTrait ' )->willReturn (false );
345
358
$ interfaceFromInterface ->method ('isAbstract ' )->willReturn (false );
@@ -355,6 +368,7 @@ public function testComplexInterface(): void
355
368
$ interfaceA ->method ('getShortName ' )->willReturn ('InterfaceA ' );
356
369
$ interfaceA ->method ('getName ' )->willReturn ('vendor\library\TestStuff\InterfaceA ' );
357
370
$ interfaceA ->method ('getDocComment ' )->willReturn (false );
371
+ $ interfaceA ->method ('getAttributes ' )->willReturn ([]);
358
372
$ interfaceA ->method ('isInterface ' )->willReturn (true );
359
373
$ interfaceA ->method ('isTrait ' )->willReturn (false );
360
374
$ interfaceA ->method ('isAbstract ' )->willReturn (false );
@@ -372,6 +386,7 @@ public function testComplexInterface(): void
372
386
$ interfaceB ->method ('getShortName ' )->willReturn ('InterfaceB ' );
373
387
$ interfaceB ->method ('getName ' )->willReturn ('vendor\library\TestStuff\InterfaceB ' );
374
388
$ interfaceB ->method ('getDocComment ' )->willReturn (false );
389
+ $ interfaceB ->method ('getAttributes ' )->willReturn ([]);
375
390
$ interfaceB ->method ('isInterface ' )->willReturn (true );
376
391
$ interfaceB ->method ('isTrait ' )->willReturn (false );
377
392
$ interfaceB ->method ('isAbstract ' )->willReturn (false );
@@ -397,6 +412,7 @@ public function testComplexInterface(): void
397
412
*/
398
413
EOT
399
414
);
415
+ $ reflectionClass ->method ('getAttributes ' )->willReturn ([]);
400
416
$ reflectionClass ->method ('isInterface ' )->willReturn (true );
401
417
$ reflectionClass ->method ('isTrait ' )->willReturn (false );
402
418
$ reflectionClass ->method ('isAbstract ' )->willReturn (false );
0 commit comments