applyToItem() публичный Метод

{@inheritdoc} The context may contain serialization groups which helps defining joined entities that are readable.
public applyToItem ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, string $operationName = null, array $context = [] )
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$resourceClass string
$identifiers array
$operationName string
$context array
 public function testResourceClassNotFoundExceptionPropertyNameCollection()
 {
     $resourceMetadataFactoryProphecy = $this->prophesize(ResourceMetadataFactoryInterface::class);
     $resourceMetadataFactoryProphecy->create(Dummy::class)->willReturn(new ResourceMetadata());
     $propertyNameCollectionFactoryProphecy = $this->prophesize(PropertyNameCollectionFactoryInterface::class);
     $propertyNameCollectionFactoryProphecy->create(UnknownDummy::class)->willThrow(new ResourceClassNotFoundException());
     $relationPropertyMetadata = new PropertyMetadata();
     $relationPropertyMetadata = $relationPropertyMetadata->withReadableLink(true);
     $propertyMetadataFactoryProphecy = $this->prophesize(PropertyMetadataFactoryInterface::class);
     $propertyMetadataFactoryProphecy->create(Dummy::class, 'relation', [])->willReturn($relationPropertyMetadata);
     $classMetadataProphecy = $this->prophesize(ClassMetadata::class);
     $classMetadataProphecy->associationMappings = ['relation' => ['fetch' => 2, 'targetEntity' => UnknownDummy::class, 'joinColumns' => [['nullable' => false]]]];
     $emProphecy = $this->prophesize(EntityManager::class);
     $emProphecy->getClassMetadata(Dummy::class)->shouldBeCalled()->willReturn($classMetadataProphecy->reveal());
     $emProphecy->getClassMetadata(UnknownDummy::class)->shouldBeCalled()->willReturn($classMetadataProphecy->reveal());
     $queryBuilderProphecy = $this->prophesize(QueryBuilder::class);
     $queryBuilderProphecy->getRootAliases()->willReturn(['o']);
     $queryBuilderProphecy->getEntityManager()->willReturn($emProphecy);
     $queryBuilderProphecy->innerJoin('o.relation', 'relation_a1')->shouldBeCalled(1);
     $orderExtensionTest = new EagerLoadingExtension($propertyNameCollectionFactoryProphecy->reveal(), $propertyMetadataFactoryProphecy->reveal(), $resourceMetadataFactoryProphecy->reveal(), 30, true);
     $orderExtensionTest->applyToItem($queryBuilderProphecy->reveal(), new QueryNameGenerator(), Dummy::class, []);
 }