diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php index 7bcbe9889..4a65883e2 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php @@ -84,7 +84,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase /** @var Address $address */ $address = $em->createQuery('SELECT a FROM '.Address::class.' a') - ->setFirstResult(rand(0, $nb)) + ->setFirstResult(random_int(0, $nb)) ->setMaxResults(1) ->getSingleResult(); @@ -108,7 +108,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase $ref = $em->createQuery('SELECT a FROM '.AddressReference::class.' a') ->setMaxResults(1) - ->setFirstResult(rand(0, $nb)) + ->setFirstResult(random_int(0, $nb)) ->getSingleResult(); $address = Address::createFromAddressReference($ref); diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php index a320bb073..60273a8c9 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php @@ -44,7 +44,7 @@ class GeographicalUnitByAddressApiControllerTest extends WebTestCase $nb = $em->createQuery('SELECT COUNT(a) FROM '.Address::class.' a')->getSingleScalarResult(); /** @var \Chill\MainBundle\Entity\Address $random */ $random = $em->createQuery('SELECT a FROM '.Address::class.' a') - ->setFirstResult(rand(0, $nb)) + ->setFirstResult(random_int(0, $nb)) ->setMaxResults(1) ->getSingleResult();