From 408d9f944c306352787e2a9e69224595c39d5c5a Mon Sep 17 00:00:00 2001 From: myrmidex Date: Fri, 5 Jun 2026 17:46:57 +0000 Subject: [PATCH] Assert lat/long is displayed on list --- src/Factory/RestaurantFactory.php | 2 ++ tests/Application/Controller/Api/SubjectControllerTest.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/Factory/RestaurantFactory.php b/src/Factory/RestaurantFactory.php index 6e2ca81..9e9ec88 100644 --- a/src/Factory/RestaurantFactory.php +++ b/src/Factory/RestaurantFactory.php @@ -36,6 +36,8 @@ final class RestaurantFactory extends PersistentObjectFactory { return [ 'name' => self::faker()->company(), + 'latitude' => self::faker()->latitude(), + 'longitude' => self::faker()->longitude(), ]; } diff --git a/tests/Application/Controller/Api/SubjectControllerTest.php b/tests/Application/Controller/Api/SubjectControllerTest.php index 24abef9..d5c6147 100644 --- a/tests/Application/Controller/Api/SubjectControllerTest.php +++ b/tests/Application/Controller/Api/SubjectControllerTest.php @@ -33,6 +33,10 @@ class SubjectControllerTest extends WebTestCase $data = json_decode($client->getResponse()->getContent(), true); $this->assertResponseIsSuccessful(); $this->assertCount(5, $data['payload']['subjects']); + + $subject = $data['payload']['subjects'][0]; + $this->assertNotNull($subject['latitude']); + $this->assertNotNull($subject['longitude']); } public function testCreate(): void