public function testSupportsResultPaginationDisabled() { /** @var ObjectProphecy|Request $requestMock */ $requestMock = $this->prophesize('Symfony\\Component\\HttpFoundation\\Request'); /* @see PaginationExtension::supportsResult */ $this->requestStackMock->getCurrentRequest()->willReturn($requestMock->reveal())->shouldBeCalledTimes(1); /* @see PaginationExtension::isPaginationEnabled */ $this->resourceMock->getEnablePaginationParameter()->willReturn('enablePagination')->shouldBeCalledTimes(1); $requestMock->get('enablePagination')->willReturn('true')->shouldBeCalledTimes(1); $this->resourceMock->isClientAllowedToEnablePagination()->willReturn(false)->shouldBeCalledTimes(1); $this->resourceMock->isPaginationEnabledByDefault()->willReturn(false)->shouldBeCalledTimes(1); $extension = new PaginationExtension($this->managerRegistryMock->reveal(), $this->requestStackMock->reveal()); $this->assertFalse($extension->supportsResult($this->resourceMock->reveal())); }