Skip to content

Commit

Permalink
3612: Updated fixtures with created and changed dates
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi-itk committed Jan 20, 2025
1 parent e054c29 commit cc487ab
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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();
Expand Down

0 comments on commit cc487ab

Please sign in to comment.