You are here

public function GroupContentEnablerManagerTest::testCreateHandlerInstance in Group 8

Tests the createHandlerInstance() method.

@covers ::createHandlerInstance

File

tests/src/Unit/GroupContentEnablerManagerTest.php, line 157

Class

GroupContentEnablerManagerTest
Tests the GroupContentEnabler plugin manager.

Namespace

Drupal\Tests\group\Unit

Code

public function testCreateHandlerInstance() {
  $handler = $this->groupContentEnablerManager
    ->createHandlerInstance(TestGroupContentHandler::class, 'some_plugin', []);
  $this
    ->assertInstanceOf(GroupContentHandlerBase::class, $handler);
  $this
    ->assertInstanceOf(ModuleHandlerInterface::class, $handler
    ->getModuleHandler());
}