Author: Kévin Dunglas (dunglas@gmail.com)
Author: Samuel ROZE (samuel.roze@gmail.com)
Inheritance: implements ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryResultCollectionExtensionInterface
Exemplo n.º 1
0
 public function testSupportsResultPaginationDisabled()
 {
     $requestStack = new RequestStack();
     $requestStack->push(new Request());
     $resourceMetadataFactoryProphecy = $this->prophesize(ResourceMetadataFactoryInterface::class);
     $resourceMetadataFactoryProphecy->create('Foo')->willReturn(new ResourceMetadata(null, null, null, [], []))->shouldBeCalled();
     $resourceMetadataFactory = $resourceMetadataFactoryProphecy->reveal();
     $extension = new PaginationExtension($this->prophesize(ManagerRegistry::class)->reveal(), $requestStack, $resourceMetadataFactory, false);
     $this->assertFalse($extension->supportsResult('Foo', 'op'));
 }