diff --git a/src/EventSubscriber/EventSubscriber.php b/src/EventSubscriber/EventSubscriber.php index ba553cdf..ff4034d8 100644 --- a/src/EventSubscriber/EventSubscriber.php +++ b/src/EventSubscriber/EventSubscriber.php @@ -74,8 +74,7 @@ public static function getSubscribedEvents() { * @param \Drupal\Core\Messenger\MessengerInterface $messenger * Messenger service. */ - public function __construct(FileSystemInterface $file_system, LoggerChannelFactoryInterface $logger_factory) { - $this->fileSystem = $file_system; + public function __construct(protected FileSystemInterface $fileSystem, LoggerChannelFactoryInterface $logger_factory, protected MessengerInterface $messenger) { $this->logger = $logger_factory->get('soe_profile'); } diff --git a/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php b/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php index 5ca48268..1df61c7a 100644 --- a/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php +++ b/tests/src/Kernel/EventSubscriber/EventSubscriberTest.php @@ -12,11 +12,16 @@ use Drupal\media\Entity\Media; use Drupal\media\Entity\MediaType; use Drupal\soe_profile\EventSubscriber\EventSubscriber as StanfordEventSubscriber; +use Drupal\user\Entity\Role; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\RequestEvent; +use Symfony\Component\HttpKernel\HttpKernelInterface; /** * Class EventSubscriberTest. * - * @group stanford_profile + * @group soe_profile * @coversDefaultClass \Drupal\soe_profile\EventSubscriber\EventSubscriber */ class EventSubscriberTest extends KernelTestBase {