Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
imonroe committed Aug 7, 2024
1 parent 7872764 commit 742d308
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/src/Kernel/EventSubscriber/EventSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -43,6 +44,8 @@ class EventSubscriberTest extends KernelTestBase {
'serialization',
'media',
'test_stanford_profile',
'samlauth',
'externalauth'
];

/**
Expand All @@ -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([
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 742d308

Please sign in to comment.