Skip to content

Commit

Permalink
Fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Nov 14, 2024
1 parent a32efc1 commit a634495
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/src/Kernel/EventSubscriber/EventSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a634495

Please sign in to comment.