EventsExampleServiceTest.php
Same filename in other branches
Namespace
Drupal\Tests\events_example\KernelFile
-
modules/
events_example/ tests/ src/ Kernel/ EventsExampleServiceTest.php
View source
<?php
namespace Drupal\Tests\events_example\Kernel;
use Drupal\KernelTests\KernelTestBase;
use Drupal\events_example\EventSubscriber\EventsExampleSubscriber;
/**
* Test to ensure 'events_example_subscriber' service is reachable.
*
* @group events_example
* @group examples
*
* @ingroup events_example
*/
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);
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
EventsExampleServiceTest | Test to ensure 'events_example_subscriber' service is reachable. |