From cc487abed259393f3cc680f952dd7de4f05eb19f Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Mon, 20 Jan 2025 16:21:35 +0100 Subject: [PATCH] 3612: Updated fixtures with created and changed dates --- .../src/Fixture/HearingFixture.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/modules/custom/hoeringsportal_hearing/modules/hoeringsportal_hearing_fixtures/src/Fixture/HearingFixture.php b/web/modules/custom/hoeringsportal_hearing/modules/hoeringsportal_hearing_fixtures/src/Fixture/HearingFixture.php index 23a5573e..749ce748 100644 --- a/web/modules/custom/hoeringsportal_hearing/modules/hoeringsportal_hearing_fixtures/src/Fixture/HearingFixture.php +++ b/web/modules/custom/hoeringsportal_hearing/modules/hoeringsportal_hearing_fixtures/src/Fixture/HearingFixture.php @@ -86,6 +86,8 @@ public function load() { $this->addReference('node:hearing:Hearing1', $entity); $entity = $entity->createDuplicate(); + $entity->setCreatedTime((new \DateTimeImmutable('-87 days'))->getTimestamp()); + $entity->setChangedTime((new \DateTimeImmutable('-42 days'))->getTimestamp()); $entity->setTitle('Høring med GIS-kort'); $entity->set('field_description', [ 'value' => <<<'EOD' @@ -106,6 +108,8 @@ public function load() { $entity->save(); $entity = $entity->createDuplicate(); + $entity->setCreatedTime((new \DateTimeImmutable('-2 days'))->getTimestamp()); + $entity->setChangedTime((new \DateTimeImmutable('-1 days'))->getTimestamp()); $entity->setTitle('Høring med slettede høringssvar'); $entity->set('field_delete_date', (new DrupalDateTime('2001-01-01'))->format(DateTimeItemInterface::DATE_STORAGE_FORMAT)); $entity->save();