|
21 | 21 | use Tests\Orisai\ObjectMapper\Doubles\Invalid\RuleAboveClassVO; |
22 | 22 | use Tests\Orisai\ObjectMapper\Doubles\Invalid\UnsupportedClassDefinitionVO; |
23 | 23 | use Tests\Orisai\ObjectMapper\Doubles\Invalid\UnsupportedPropertyDefinitionVO; |
24 | | -use Tests\Orisai\ObjectMapper\Doubles\Invalid\VariantFieldChildVO; |
25 | | -use Tests\Orisai\ObjectMapper\Doubles\Invalid\VariantFieldVO; |
26 | 24 |
|
27 | 25 | final class ReflectorMetaSourceTest extends TestCase |
28 | 26 | { |
@@ -80,47 +78,6 @@ public function provideUnsupportedDefinitionType(): Generator |
80 | 78 | ]; |
81 | 79 | } |
82 | 80 |
|
83 | | - public function testFieldInvarianceRelativeName(): void |
84 | | - { |
85 | | - $reflector = new ReflectionClass(VariantFieldVO::class); |
86 | | - $group = $this->createStructureGroup($reflector); |
87 | | - |
88 | | - $this->expectException(InvalidArgument::class); |
89 | | - $this->expectExceptionMessage( |
90 | | - <<<'MSG' |
91 | | -Context: Resolving metadata of mapped object |
92 | | - 'Tests\Orisai\ObjectMapper\Doubles\Invalid\VariantFieldVO'. |
93 | | -Problem: Definition in annotation of property '$field' differs from definition |
94 | | - in annotation of property |
95 | | - 'Tests\Orisai\ObjectMapper\Doubles\Invalid\VariantFieldParentVO->$field'. |
96 | | -Solution: Don't override metadata of properties in child classes. |
97 | | -MSG, |
98 | | - ); |
99 | | - |
100 | | - $this->source->load($reflector, $group); |
101 | | - } |
102 | | - |
103 | | - public function testFieldInvarianceFullName(): void |
104 | | - { |
105 | | - $reflector = new ReflectionClass(VariantFieldChildVO::class); |
106 | | - $group = $this->createStructureGroup($reflector); |
107 | | - |
108 | | - $this->expectException(InvalidArgument::class); |
109 | | - $this->expectExceptionMessage( |
110 | | - <<<'MSG' |
111 | | -Context: Resolving metadata of mapped object |
112 | | - 'Tests\Orisai\ObjectMapper\Doubles\Invalid\VariantFieldChildVO'. |
113 | | -Problem: Definition in annotation of property |
114 | | - 'Tests\Orisai\ObjectMapper\Doubles\Invalid\VariantFieldVO->$field' |
115 | | - differs from definition in annotation of property |
116 | | - 'Tests\Orisai\ObjectMapper\Doubles\Invalid\VariantFieldParentVO->$field'. |
117 | | -Solution: Don't override metadata of properties in child classes. |
118 | | -MSG, |
119 | | - ); |
120 | | - |
121 | | - $this->source->load($reflector, $group); |
122 | | - } |
123 | | - |
124 | 81 | public function testRuleAboveClassRelativeName(): void |
125 | 82 | { |
126 | 83 | $reflector = new ReflectionClass(RuleAboveClassVO::class); |
|
0 commit comments