class EventsExampleServiceTest

Test to ensure 'events_example_subscriber' service is reachable.

@group events_example @group examples

Hierarchy

Expanded class hierarchy of EventsExampleServiceTest

Related topics

File

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

Namespace

Drupal\Tests\events_example\Kernel
View source
class EventsExampleServiceTest extends KernelTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'events_example',
  ];
  
  /**
   * Test for existence of 'events_example_subscriber' service.
   */
  public function testEventsExampleService() {
    $subscriber = $this->container
      ->get('events_example_subscriber');
    $this->assertInstanceOf(EventsExampleSubscriber::class, $subscriber);
  }

}

Members

Title Sort descending Modifiers Object type Summary
EventsExampleServiceTest::$modules protected static property
EventsExampleServiceTest::testEventsExampleService public function Test for existence of 'events_example_subscriber' service.