From 1e353ed74bdca92555248f1ee8b4fbb19dfdd456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 25 Aug 2023 18:26:32 +0200 Subject: [PATCH] Fix loading of random address reference in AddressToReferenceMatcherControllerTest.php --- .../Controller/AddressToReferenceMatcherControllerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php index 4a65883e2..dfc713f7f 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php @@ -42,7 +42,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase { $client = $this->getClientAuthenticated(); - $client->request('POST', "/api/1.0/main/address/reference-match/${addressId}/set/reviewed"); + $client->request('POST', "/api/1.0/main/address/reference-match/{$addressId}/set/reviewed"); $this->assertResponseIsSuccessful(); @@ -58,7 +58,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase { $client = $this->getClientAuthenticated(); - $client->request('POST', "/api/1.0/main/address/reference-match/${addressId}/sync-with-reference"); + $client->request('POST', "/api/1.0/main/address/reference-match/{$addressId}/sync-with-reference"); $this->assertResponseIsSuccessful(); @@ -108,7 +108,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase $ref = $em->createQuery('SELECT a FROM '.AddressReference::class.' a') ->setMaxResults(1) - ->setFirstResult(random_int(0, $nb)) + ->setFirstResult(random_int(0, $nb - 1)) ->getSingleResult(); $address = Address::createFromAddressReference($ref);