From 3c4b053e0e6b7b9188166bceb9b644ae198911a0 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 11 Jun 2025 09:11:36 +0100 Subject: [PATCH] Use `getTimestamp()` method --- .../tests/src/Functional/Entity/PresentationTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/opd_presentations/tests/src/Functional/Entity/PresentationTest.php b/modules/opd_presentations/tests/src/Functional/Entity/PresentationTest.php index 7e9dcf5ec..478f06b69 100644 --- a/modules/opd_presentations/tests/src/Functional/Entity/PresentationTest.php +++ b/modules/opd_presentations/tests/src/Functional/Entity/PresentationTest.php @@ -15,9 +15,9 @@ final class PresentationTest extends ExistingSiteBase { public function test_only_past_events_are_returned(): void { $presentation = $this->createPresentation( events: [ - $this->createEvent(['field_date' => (new DrupalDateTime('now'))->format('U')]), - $this->createEvent(['field_date' => (new DrupalDateTime('yesterday'))->format('U')]), - $this->createEvent(['field_date' => (new DrupalDateTime('tomorrow'))->format('U')]), + $this->createEvent(['field_date' => (new DrupalDateTime('now'))->getTimestamp()]), + $this->createEvent(['field_date' => (new DrupalDateTime('yesterday'))->getTimestamp()]), + $this->createEvent(['field_date' => (new DrupalDateTime('tomorrow'))->getTimestamp()]), ], );