/** * @test */ public function countRespectsOffsetConstraint() { $testEntityRepository = new Fixtures\TestEntityRepository(); $testEntityRepository->removeAll(); $testEntity1 = new Fixtures\TestEntity(); $testEntity1->setName('Flow'); $testEntityRepository->add($testEntity1); $testEntity2 = new Fixtures\TestEntity(); $testEntity2->setName('some'); $testEntityRepository->add($testEntity2); $testEntity3 = new Fixtures\TestEntity(); $testEntity3->setName('more'); $testEntityRepository->add($testEntity3); $this->persistenceManager->persistAll(); $query = new Query(Fixtures\TestEntity::class); $this->assertEquals(1, $query->setOffset(2)->execute()->count()); }