diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php index 08034978e..94a0ac243 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php @@ -65,7 +65,7 @@ final class HouseholdApiControllerTest extends WebTestCase } $reference = $em->createQueryBuilder()->select('ar')->from(AddressReference::class, 'ar') - ->setFirstResult(random_int(0, $nbReference)) + ->setFirstResult(random_int(0, $nbReference - 1)) ->setMaxResults(1) ->getQuery()->getSingleResult();