public function testLimitCanBeAddedToFindAll()
{
for ($i = 1; $i <= 10; ++$i) {
$user = new User(sprintf('login%d', $i));
$this->em->persist($user);
}
$this->em->flush();
$this->em->clear();
$users = $this->em->getRepository(User::class)->findAll();
$this->assertCount(10, $users);
unset($users);
$filtered = $this->em->getRepository(User::class)->findAll(['limit' => 5]);
$this->assertCount(5, $filtered);
}