@@ -61,7 +61,6 @@ public function testApplyToCollection()
61
61
$ queryBuilderProphecy = $ this ->prophesize (QueryBuilder::class);
62
62
63
63
$ classMetadataProphecy = $ this ->prophesize (ClassMetadata::class);
64
- $ classMetadataProphecy ->getAssociationNames ()->shouldBeCalled ()->willReturn ([0 => 'relatedDummy ' , 'relatedDummy2 ' ]);
65
64
$ classMetadataProphecy ->associationMappings = [
66
65
'relatedDummy ' => ['fetch ' => 3 , 'joinColumns ' => [['nullable ' => true ]], 'targetEntity ' => RelatedDummy::class],
67
66
'relatedDummy2 ' => ['fetch ' => 3 , 'joinColumns ' => [['nullable ' => false ]], 'targetEntity ' => RelatedDummy::class],
@@ -75,7 +74,7 @@ public function testApplyToCollection()
75
74
}
76
75
}
77
76
78
- $ relatedClassMetadataProphecy ->getAssociationNames ()-> shouldBeCalled ()-> willReturn ([]) ;
77
+ $ relatedClassMetadataProphecy ->associationMappings = [] ;
79
78
80
79
$ emProphecy = $ this ->prophesize (EntityManager::class);
81
80
$ emProphecy ->getClassMetadata (Dummy::class)->shouldBeCalled ()->willReturn ($ classMetadataProphecy ->reveal ());
@@ -110,6 +109,7 @@ public function testApplyToItem()
110
109
$ propertyMetadataFactoryProphecy ->create (Dummy::class, 'relatedDummy2 ' , [])->willReturn ($ relationPropertyMetadata )->shouldBeCalled ();
111
110
$ propertyMetadataFactoryProphecy ->create (Dummy::class, 'relatedDummy3 ' , [])->willReturn ($ relationPropertyMetadata )->shouldBeCalled ();
112
111
$ propertyMetadataFactoryProphecy ->create (Dummy::class, 'relatedDummy4 ' , [])->willReturn ($ relationPropertyMetadata )->shouldBeCalled ();
112
+ $ propertyMetadataFactoryProphecy ->create (Dummy::class, 'relatedDummy5 ' , [])->willReturn ($ relationPropertyMetadata )->shouldBeCalled ();
113
113
114
114
$ idPropertyMetadata = new PropertyMetadata ();
115
115
$ idPropertyMetadata = $ idPropertyMetadata ->withIdentifier (true );
@@ -130,7 +130,6 @@ public function testApplyToItem()
130
130
$ queryBuilderProphecy = $ this ->prophesize (QueryBuilder::class);
131
131
132
132
$ classMetadataProphecy = $ this ->prophesize (ClassMetadata::class);
133
- $ classMetadataProphecy ->getAssociationNames ()->shouldBeCalled ()->willReturn (['relatedDummy ' , 'relatedDummy2 ' , 'relatedDummy3 ' , 'relatedDummy4 ' ]);
134
133
$ classMetadataProphecy ->associationMappings = [
135
134
'relatedDummy ' => ['fetch ' => 3 , 'joinColumns ' => [['nullable ' => true ]], 'targetEntity ' => RelatedDummy::class],
136
135
'relatedDummy2 ' => ['fetch ' => 3 , 'joinColumns ' => [['nullable ' => false ]], 'targetEntity ' => UnknownDummy::class],
@@ -147,14 +146,12 @@ public function testApplyToItem()
147
146
}
148
147
}
149
148
150
- $ relatedClassMetadataProphecy ->getAssociationNames ()->shouldBeCalled ()->willReturn (['relation ' ]);
151
-
152
149
$ relatedClassMetadataProphecy ->associationMappings = [
153
150
'relation ' => ['fetch ' => 3 , 'joinColumns ' => [['nullable ' => false ]], 'targetEntity ' => UnknownDummy::class],
154
151
];
155
152
156
153
$ unknownClassMetadataProphecy = $ this ->prophesize (ClassMetadata::class);
157
- $ unknownClassMetadataProphecy ->getAssociationNames ()-> shouldBeCalled ()-> willReturn ([]) ;
154
+ $ unknownClassMetadataProphecy ->associationMappings = [] ;
158
155
159
156
$ emProphecy = $ this ->prophesize (EntityManager::class);
160
157
$ emProphecy ->getClassMetadata (Dummy::class)->shouldBeCalled ()->willReturn ($ classMetadataProphecy ->reveal ());
@@ -188,7 +185,6 @@ public function testCreateItemWithOperationName()
188
185
$ propertyMetadataFactoryProphecy ->create (Dummy::class, 'foo ' , ['item_operation_name ' => 'item_operation ' ])->shouldBeCalled ()->willReturn (new PropertyMetadata ());
189
186
190
187
$ classMetadataProphecy = $ this ->prophesize (ClassMetadata::class);
191
- $ classMetadataProphecy ->getAssociationNames ()->shouldBeCalled ()->willReturn (['foo ' ]);
192
188
$ classMetadataProphecy ->associationMappings = [
193
189
'foo ' => ['fetch ' => 1 ],
194
190
];
@@ -209,7 +205,6 @@ public function testCreateCollectionWithOperationName()
209
205
$ propertyMetadataFactoryProphecy ->create (Dummy::class, 'foo ' , ['collection_operation_name ' => 'collection_operation ' ])->shouldBeCalled ()->willReturn (new PropertyMetadata ());
210
206
211
207
$ classMetadataProphecy = $ this ->prophesize (ClassMetadata::class);
212
- $ classMetadataProphecy ->getAssociationNames ()->shouldBeCalled ()->willReturn (['foo ' ]);
213
208
$ classMetadataProphecy ->associationMappings = [
214
209
'foo ' => ['fetch ' => 1 ],
215
210
];
0 commit comments