From a634495fc135836e189e1984045f29e9ec9f95ac Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Thu, 14 Nov 2024 09:25:33 -0800 Subject: [PATCH] Fixed unit test --- tests/src/Kernel/EventSubscriber/EventSubscriberTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php b/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php index b4d051bb8..b7d5fa952 100644 --- a/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php +++ b/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php @@ -7,6 +7,7 @@ use Drupal\Core\Session\AccountProxyInterface; use Drupal\core_event_dispatcher\Event\Entity\EntityInsertEvent; use Drupal\Core\Site\Settings; +use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface; use Drupal\default_content\Event\ImportEvent; use Drupal\file\Entity\File; use Drupal\KernelTests\KernelTestBase; @@ -149,6 +150,7 @@ public function testKernelRequest() { new Settings($site_settings); $config_page_loader = $this->createMock(ConfigPagesLoaderServiceInterface::class); + $config_page_loader->method('getValue')->willReturn(date(DateTimeItemInterface::DATETIME_STORAGE_FORMAT, 0)); \Drupal::getContainer()->set('config_pages.loader', $config_page_loader); $account = $this->createMock(AccountProxyInterface::class);