@@ -167,7 +167,7 @@ public function testGetSubresource()
167
167
168
168
$ dataProvider = new SubresourceDataProvider ($ managerRegistryProphecy ->reveal (), $ this ->resourceMetadataFactoryProphecy ->reveal (), $ propertyNameCollectionFactory , $ propertyMetadataFactory );
169
169
170
- $ context = ['property ' => 'relatedDummies ' , 'identifiers ' => [[ 'id ' , Dummy::class]], 'collection ' => true , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
170
+ $ context = ['property ' => 'relatedDummies ' , 'identifiers ' => ['id ' => [ Dummy::class, ' id ' ]], 'collection ' => true , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
171
171
172
172
$ this ->assertEquals ([], $ dataProvider ->getSubresource (RelatedDummy::class, ['id ' => ['id ' => 1 ]], $ context ));
173
173
}
@@ -256,7 +256,7 @@ public function testGetSubSubresourceItem()
256
256
257
257
$ dataProvider = new SubresourceDataProvider ($ managerRegistryProphecy ->reveal (), $ this ->resourceMetadataFactoryProphecy ->reveal (), $ propertyNameCollectionFactory , $ propertyMetadataFactory );
258
258
259
- $ context = ['property ' => 'thirdLevel ' , 'identifiers ' => [[ 'id ' , Dummy::class], [ 'relatedDummies ' , RelatedDummy::class]], 'collection ' => false , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
259
+ $ context = ['property ' => 'thirdLevel ' , 'identifiers ' => ['id ' => [ Dummy::class, ' id ' ], 'relatedDummies ' => [ RelatedDummy::class, ' id ' ]], 'collection ' => false , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
260
260
261
261
$ this ->assertEquals ($ result , $ dataProvider ->getSubresource (ThirdLevel::class, ['id ' => ['id ' => 1 ], 'relatedDummies ' => ['id ' => 1 ]], $ context ));
262
262
}
@@ -353,7 +353,7 @@ public function testGetSubSubresourceItemWithExecuteOptions()
353
353
354
354
$ dataProvider = new SubresourceDataProvider ($ managerRegistryProphecy ->reveal (), $ this ->resourceMetadataFactoryProphecy ->reveal (), $ propertyNameCollectionFactory , $ propertyMetadataFactory );
355
355
356
- $ context = ['property ' => 'thirdLevel ' , 'identifiers ' => [[ 'id ' , Dummy::class], [ 'relatedDummies ' , RelatedDummy::class]], 'collection ' => false , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
356
+ $ context = ['property ' => 'thirdLevel ' , 'identifiers ' => ['id ' => [ Dummy::class, ' id ' ], 'relatedDummies ' => [ RelatedDummy::class, ' id ' ]], 'collection ' => false , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
357
357
358
358
$ this ->assertEquals ($ result , $ dataProvider ->getSubresource (ThirdLevel::class, ['id ' => ['id ' => 1 ], 'relatedDummies ' => ['id ' => 1 ]], $ context , 'third_level_operation_name ' ));
359
359
}
@@ -405,7 +405,7 @@ public function testGetSubresourceOneToOneOwningRelation()
405
405
406
406
$ dataProvider = new SubresourceDataProvider ($ managerRegistryProphecy ->reveal (), $ this ->resourceMetadataFactoryProphecy ->reveal (), $ propertyNameCollectionFactory , $ propertyMetadataFactory );
407
407
408
- $ context = ['property ' => 'ownedDummy ' , 'identifiers ' => [[ 'id ' , Dummy::class]], 'collection ' => false , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
408
+ $ context = ['property ' => 'ownedDummy ' , 'identifiers ' => ['id ' => [ Dummy::class, ' id ' ]], 'collection ' => false , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
409
409
410
410
$ this ->assertEquals ($ result , $ dataProvider ->getSubresource (RelatedOwningDummy::class, ['id ' => ['id ' => 1 ]], $ context ));
411
411
}
@@ -458,7 +458,7 @@ public function testAggregationResultExtension()
458
458
459
459
$ dataProvider = new SubresourceDataProvider ($ managerRegistryProphecy ->reveal (), $ this ->resourceMetadataFactoryProphecy ->reveal (), $ propertyNameCollectionFactory , $ propertyMetadataFactory , [$ extensionProphecy ->reveal ()]);
460
460
461
- $ context = ['property ' => 'relatedDummies ' , 'identifiers ' => [[ 'id ' , Dummy::class]], 'collection ' => true , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
461
+ $ context = ['property ' => 'relatedDummies ' , 'identifiers ' => ['id ' => [ Dummy::class, ' id ' ]], 'collection ' => true , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
462
462
463
463
$ this ->assertEquals ([], $ dataProvider ->getSubresource (RelatedDummy::class, ['id ' => ['id ' => 1 ]], $ context ));
464
464
}
@@ -539,7 +539,7 @@ public function testGetSubresourceCollectionItem()
539
539
540
540
$ dataProvider = new SubresourceDataProvider ($ managerRegistryProphecy ->reveal (), $ this ->resourceMetadataFactoryProphecy ->reveal (), $ propertyNameCollectionFactory , $ propertyMetadataFactory );
541
541
542
- $ context = ['property ' => 'id ' , 'identifiers ' => [[ 'id ' , Dummy::class, true ], [' relatedDummies ' , RelatedDummy::class, true ]], 'collection ' => false , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
542
+ $ context = ['property ' => 'id ' , 'identifiers ' => ['id ' => [ Dummy::class, ' id ' , true ], [RelatedDummy::class, ' relatedDummies ' , true ]], 'collection ' => false , IdentifierConverterInterface::HAS_IDENTIFIER_CONVERTER => true ];
543
543
544
544
$ this ->assertEquals ($ result , $ dataProvider ->getSubresource (RelatedDummy::class, ['id ' => ['id ' => 1 ], 'relatedDummies ' => ['id ' => 2 ]], $ context ));
545
545
}
0 commit comments