From 742d3080d2062e0ee3a16b8c5b18515485eb9034 Mon Sep 17 00:00:00 2001 From: Ian Monroe Date: Wed, 7 Aug 2024 16:06:27 -0600 Subject: [PATCH] fix test --- tests/src/Kernel/EventSubscriber/EventSubscriberTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php b/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php index fd5d1b1d..4e05a4b3 100644 --- a/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php +++ b/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php @@ -14,6 +14,7 @@ use Drupal\media\Entity\MediaType; use Drupal\engineering_profile\EventSubscriber\EventSubscriber as StanfordEventSubscriber; use Drupal\user\Entity\Role; +use GuzzleHttp\ClientInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Event\RequestEvent; @@ -43,6 +44,8 @@ class EventSubscriberTest extends KernelTestBase { 'serialization', 'media', 'test_stanford_profile', + 'samlauth', + 'externalauth' ]; /** @@ -68,8 +71,9 @@ public function setup(): void { $file_system = \Drupal::service('file_system'); $logger_factory = \Drupal::service('logger.factory'); $messenger = \Drupal::messenger(); + $client = $this->createMock(ClientInterface::class); - $this->eventSubscriber = new TestStanfordEventSubscriber($file_system, $logger_factory, $messenger); + $this->eventSubscriber = new TestStanfordEventSubscriber($file_system, $client, $logger_factory, $messenger); /** @var \Drupal\media\MediaTypeInterface $media_type */ $media_type = MediaType::create([ @@ -124,7 +128,6 @@ public function testContentImportEntity() { } public function testUserInsert() { - \Drupal::service('module_installer')->install(['samlauth']); $role = Role::create(['id' => 'test_role1', 'label' => 'Test role 1']); $role->save();