function EventsExampleServiceTest::testEventsExampleService

Same name in other branches
  1. 4.0.x modules/events_example/tests/src/Kernel/EventsExampleServiceTest.php \Drupal\Tests\events_example\Kernel\EventsExampleServiceTest::testEventsExampleService()

Test for existence of 'events_example_subscriber' service.

File

modules/events_example/tests/src/Kernel/EventsExampleServiceTest.php, line 26

Class

EventsExampleServiceTest
Test to ensure 'events_example_subscriber' service is reachable.

Namespace

Drupal\Tests\events_example\Kernel

Code

public function testEventsExampleService() {
    $subscriber = $this->container
        ->get('events_example_subscriber');
    $this->assertInstanceOf(EventsExampleSubscriber::class, $subscriber);
}