class EventsExampleServiceTest
Same name in other branches
- 3.x modules/events_example/tests/src/Kernel/EventsExampleServiceTest.php \Drupal\Tests\events_example\Kernel\EventsExampleServiceTest
- 4.0.x modules/events_example/tests/src/Kernel/EventsExampleServiceTest.php \Drupal\Tests\events_example\Kernel\EventsExampleServiceTest
Test to ensure 'events_example_subscriber' service is reachable.
@group events_example @group examples
Hierarchy
- class \Drupal\Tests\events_example\Kernel\EventsExampleServiceTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of EventsExampleServiceTest
Related topics
File
-
events_example/
tests/ src/ Kernel/ EventsExampleServiceTest.php, line 16
Namespace
Drupal\Tests\events_example\KernelView source
class EventsExampleServiceTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public 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 | public static | property | |
EventsExampleServiceTest::testEventsExampleService | public | function | Test for existence of 'events_example_subscriber' service. |