@@ -99,7 +99,7 @@ public function testClassWithSleepProxyGeneration()
99
99
$ this ->generateAndRequire ($ proxyGenerator , $ metadata );
100
100
}
101
101
102
- $ classCode = file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxySleepClass .php ' );
102
+ $ classCode = file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/SleepClass .php ' );
103
103
self ::assertEquals (1 , substr_count ($ classCode , 'function __sleep ' ));
104
104
self ::assertEquals (1 , substr_count ($ classCode , 'parent::__sleep() ' ));
105
105
}
@@ -119,7 +119,7 @@ public function testClassWithStaticPropertyProxyGeneration()
119
119
$ this ->generateAndRequire ($ proxyGenerator , $ metadata );
120
120
}
121
121
122
- $ classCode = file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyStaticPropertyClass .php ' );
122
+ $ classCode = file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/StaticPropertyClass .php ' );
123
123
self ::assertEquals (1 , substr_count ($ classCode , 'function __sleep ' ));
124
124
self ::assertStringNotContainsString ('protectedStaticProperty ' , $ classCode );
125
125
}
@@ -141,7 +141,7 @@ public function testClassWithCallableTypeHintOnProxiedMethod()
141
141
$ this ->generateAndRequire ($ proxyGenerator , $ metadata );
142
142
}
143
143
144
- $ classCode = file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyCallableTypeHintClass .php ' );
144
+ $ classCode = file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/CallableTypeHintClass .php ' );
145
145
146
146
self ::assertEquals (1 , substr_count ($ classCode , 'call(callable $foo) ' ));
147
147
}
@@ -156,7 +156,7 @@ public function testClassWithVariadicArgumentOnProxiedMethod()
156
156
$ this ->generateAndRequire ($ proxyGenerator , $ metadata );
157
157
}
158
158
159
- $ classCode = file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyVariadicTypeHintClass .php ' );
159
+ $ classCode = file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/VariadicTypeHintClass .php ' );
160
160
161
161
self ::assertEquals (1 , substr_count ($ classCode , 'function addType(...$types) ' ));
162
162
self ::assertEquals (1 , substr_count ($ classCode , '__invoke($this, \'addType \', [$types]) ' ));
@@ -173,7 +173,7 @@ public function testClassWithScalarTypeHintsOnProxiedMethods()
173
173
$ this ->generateAndRequire ($ proxyGenerator , $ metadata );
174
174
}
175
175
176
- $ classCode = file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyScalarTypeHintsClass .php ' );
176
+ $ classCode = file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/ScalarTypeHintsClass .php ' );
177
177
178
178
self ::assertEquals (1 , substr_count ($ classCode , 'function singleTypeHint(string $param) ' ));
179
179
self ::assertEquals (1 , substr_count ($ classCode , 'function multipleTypeHints(int $a, float $b, bool $c, string $d) ' ));
@@ -193,7 +193,7 @@ public function testClassWithReturnTypesOnProxiedMethods()
193
193
$ this ->generateAndRequire ($ proxyGenerator , $ metadata );
194
194
}
195
195
196
- $ classCode = file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyReturnTypesClass .php ' );
196
+ $ classCode = file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/ReturnTypesClass .php ' );
197
197
198
198
self ::assertEquals (1 , substr_count ($ classCode , 'function returnsClass(): \stdClass ' ));
199
199
self ::assertEquals (1 , substr_count ($ classCode , 'function returnsScalar(): int ' ));
@@ -214,7 +214,7 @@ public function testClassWithNullableTypeHintsOnProxiedMethods()
214
214
$ this ->generateAndRequire ($ proxyGenerator , $ metadata );
215
215
}
216
216
217
- $ classCode = file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyNullableTypeHintsClass .php ' );
217
+ $ classCode = file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/NullableTypeHintsClass .php ' );
218
218
219
219
self ::assertEquals (1 , substr_count ($ classCode , 'function nullableTypeHintInt(?int $param) ' ));
220
220
self ::assertEquals (1 , substr_count ($ classCode , 'function nullableTypeHintObject(?\stdClass $param) ' ));
@@ -234,7 +234,7 @@ public function testClassWithNullableReturnTypesOnProxiedMethods()
234
234
$ this ->generateAndRequire ($ proxyGenerator , $ metadata );
235
235
}
236
236
237
- $ classCode = file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyNullableTypeHintsClass .php ' );
237
+ $ classCode = file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/NullableTypeHintsClass .php ' );
238
238
239
239
self ::assertEquals (1 , substr_count ($ classCode , 'function returnsNullableInt(): ?int ' ));
240
240
self ::assertEquals (1 , substr_count ($ classCode , 'function returnsNullableObject(): ?\stdClass ' ));
@@ -260,12 +260,12 @@ public function testClassWithNullableOptionalNonLastParameterOnProxiedMethods()
260
260
261
261
self ::assertStringContainsString (
262
262
'public function midSignatureNullableParameter(\stdClass $param = NULL, $secondParam) ' ,
263
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyNullableNonOptionalHintClass .php ' )
263
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/NullableNonOptionalHintClass .php ' )
264
264
);
265
265
266
266
self ::assertStringContainsString (
267
267
'public function midSignatureNotNullableHintedParameter(string $param = \'foo \', $secondParam) ' ,
268
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyNullableNonOptionalHintClass .php ' )
268
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/NullableNonOptionalHintClass .php ' )
269
269
);
270
270
}
271
271
@@ -288,13 +288,13 @@ public function testClassWithPhp71NullableOptionalNonLastParameterOnProxiedMetho
288
288
289
289
self ::assertStringContainsString (
290
290
'public function midSignatureNullableParameter(string $param = NULL, $secondParam) ' ,
291
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPhp71NullableDefaultedNonOptionalHintClass .php ' ),
291
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/Php71NullableDefaultedNonOptionalHintClass .php ' ),
292
292
'Signature allows nullable type, although explicit "?" marker isn \'t used in the proxy '
293
293
);
294
294
295
295
self ::assertStringContainsString (
296
296
'public function midSignatureNotNullableHintedParameter(?string $param = \'foo \', $secondParam) ' ,
297
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPhp71NullableDefaultedNonOptionalHintClass .php ' )
297
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/Php71NullableDefaultedNonOptionalHintClass .php ' )
298
298
);
299
299
}
300
300
@@ -308,7 +308,7 @@ public function testClassWithVoidReturnType()
308
308
$ this ->generateAndRequire ($ proxyGenerator , $ metadata );
309
309
}
310
310
311
- $ classCode = file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyVoidReturnTypeClass .php ' );
311
+ $ classCode = file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/VoidReturnTypeClass .php ' );
312
312
313
313
self ::assertEquals (1 , substr_count ($ classCode , 'function returnsVoid(): void ' ));
314
314
}
@@ -323,7 +323,7 @@ public function testClassWithIterableTypeHint()
323
323
$ this ->generateAndRequire ($ proxyGenerator , $ metadata );
324
324
}
325
325
326
- $ classCode = file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyIterableTypeHintClass .php ' );
326
+ $ classCode = file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/IterableTypeHintClass .php ' );
327
327
328
328
self ::assertEquals (1 , substr_count ($ classCode , 'function parameterType(iterable $param) ' ));
329
329
self ::assertEquals (1 , substr_count ($ classCode , 'function returnType(): iterable ' ));
@@ -433,7 +433,7 @@ public function testPhp8CloneWithVoidReturnType()
433
433
434
434
self ::assertStringContainsString (
435
435
'public function __clone(): void ' ,
436
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPhp8MagicCloneClass .php ' )
436
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/Php8MagicCloneClass .php ' )
437
437
);
438
438
}
439
439
@@ -453,12 +453,12 @@ public function testPhp8UnionTypes()
453
453
454
454
self ::assertStringContainsString (
455
455
'setValue(\stdClass|array $value): float|bool ' ,
456
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPhp8UnionTypes .php ' )
456
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/Php8UnionTypes .php ' )
457
457
);
458
458
459
459
self ::assertStringContainsString (
460
460
'setNullableValue(\stdClass|array|null $value): float|bool|null ' ,
461
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPhp8UnionTypes .php ' )
461
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/Php8UnionTypes .php ' )
462
462
);
463
463
}
464
464
@@ -478,7 +478,7 @@ public function testPhp8MixedType()
478
478
479
479
self ::assertStringContainsString (
480
480
'foo(mixed $bar): mixed ' ,
481
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPhp8MixedType .php ' )
481
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/Php8MixedType .php ' )
482
482
);
483
483
}
484
484
@@ -498,12 +498,12 @@ public function testPhp8StaticType()
498
498
499
499
self ::assertStringContainsString (
500
500
'foo(mixed $bar): static ' ,
501
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPhp8StaticType .php ' )
501
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/Php8StaticType .php ' )
502
502
);
503
503
504
504
self ::assertStringContainsString (
505
505
'fooNull(mixed $bar): ?static ' ,
506
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPhp8StaticType .php ' )
506
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/Php8StaticType .php ' )
507
507
);
508
508
}
509
509
@@ -523,7 +523,7 @@ public function testPhp81IntersectionType()
523
523
524
524
self ::assertStringContainsString (
525
525
'setFoo(\Traversable&\Countable $foo): \Traversable&\Countable ' ,
526
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81IntersectionTypes .php ' )
526
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81IntersectionTypes .php ' )
527
527
);
528
528
}
529
529
@@ -543,17 +543,17 @@ public function testPhp81NeverType()
543
543
544
544
self ::assertStringContainsString (
545
545
'__get($name): never ' ,
546
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81NeverType .php ' )
546
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81NeverType .php ' )
547
547
);
548
548
549
549
self ::assertStringContainsString (
550
550
'__set($name, $value): never ' ,
551
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81NeverType .php ' )
551
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81NeverType .php ' )
552
552
);
553
553
554
554
self ::assertStringContainsString (
555
555
'finishHim(): never ' ,
556
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81NeverType .php ' )
556
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81NeverType .php ' )
557
557
);
558
558
}
559
559
@@ -575,7 +575,7 @@ public function testEnumDefaultInPublicProperty() : void
575
575
576
576
$ this ->assertStringContainsString (
577
577
'use Doctrine; ' ,
578
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPhp81EnumPublicPropertyType .php ' )
578
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/Php81EnumPublicPropertyType .php ' )
579
579
);
580
580
581
581
$ object = new \Doctrine \Tests \Common \ProxyProxy \__CG__ \Doctrine \Tests \Common \Proxy \Php81EnumPublicPropertyType ();
@@ -600,37 +600,37 @@ public function testPhp81NewInInitializers()
600
600
601
601
self ::assertStringContainsString (
602
602
'onlyInitializer($foo = new \stdClass()): void ' ,
603
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81NewInInitializers .php ' )
603
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81NewInInitializers .php ' )
604
604
);
605
605
606
606
self ::assertStringContainsString (
607
607
'typed(\DateTimeInterface $foo = new \DateTimeImmutable( \'now \')): void ' ,
608
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81NewInInitializers .php ' )
608
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81NewInInitializers .php ' )
609
609
);
610
610
611
611
self ::assertStringContainsString (
612
612
'arrayInDefault(array $foo = [new \DateTimeImmutable( \'2022-08-22 16:20 \', new \DateTimeZone( \'Europe/Warsaw \'))]): void ' ,
613
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81NewInInitializers .php ' )
613
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81NewInInitializers .php ' )
614
614
);
615
615
616
616
self ::assertStringContainsString (
617
617
'scalarConstInDefault(string $foo = \'foo \'): void ' ,
618
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81NewInInitializers .php ' )
618
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81NewInInitializers .php ' )
619
619
);
620
620
621
621
self ::assertStringContainsString (
622
622
'constInDefault(array $foo = \Doctrine\Tests\Common\Util\TestAsset\ConstProvider::FOO): void ' ,
623
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81NewInInitializers .php ' )
623
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81NewInInitializers .php ' )
624
624
);
625
625
626
626
self ::assertStringContainsString (
627
627
"globalEolInDefault(string \$foo = ' \n'): void " ,
628
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81NewInInitializers .php ' )
628
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81NewInInitializers .php ' )
629
629
);
630
630
631
631
self ::assertStringContainsString (
632
632
"specialCharacterInDefault(string \$foo = ' \n'): void " ,
633
- file_get_contents (__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyPHP81NewInInitializers .php ' )
633
+ file_get_contents (__DIR__ . '/generated/__CG__/Doctrine/Tests/Common/Proxy/PHP81NewInInitializers .php ' )
634
634
);
635
635
}
636
636
0 commit comments