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);