From f88718e26321fd71bddc39d86bfaf9cd79f74445 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 9 Sep 2025 16:08:27 +0200 Subject: [PATCH] fix: update CalendarTypeTest to use ATOM date format - Adjust assertions to use `ATOM` date format for `startDate` and `endDate` --- .../Tests/Form/CalendarTypeTest.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillCalendarBundle/Tests/Form/CalendarTypeTest.php b/src/Bundle/ChillCalendarBundle/Tests/Form/CalendarTypeTest.php index 2958a04c9..0339b9d50 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Form/CalendarTypeTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Form/CalendarTypeTest.php @@ -111,8 +111,14 @@ final class CalendarTypeTest extends TypeTestCase $form->submit($formData); $this->assertTrue($form->isSynchronized()); - $this->assertEquals(\DateTimeImmutable::createFromFormat('Y-m-d H:i:s', '2022-05-05 14:00:00'), $calendar->getStartDate()); - $this->assertEquals(\DateTimeImmutable::createFromFormat('Y-m-d H:i:s', '2022-05-05 14:30:00'), $calendar->getEndDate()); + $this->assertEquals( + \DateTimeImmutable::createFromFormat(\DateTimeImmutable::ATOM, $formData['startDate']), + $calendar->getStartDate() + ); + $this->assertEquals( + \DateTimeImmutable::createFromFormat(\DateTimeImmutable::ATOM, $formData['endDate']), + $calendar->getEndDate() + ); $this->assertEquals(7, $calendar->getPersons()->first()->getId()); $this->assertEquals(8, $calendar->getCalendarRange()->getId()); $this->assertEquals(9, $calendar->getLocation()->getId());