You are here

public function GroupTypeTest::testGetNonExistentContentPlugin in Group 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Kernel/GroupTypeTest.php \Drupal\Tests\group\Kernel\GroupTypeTest::testGetNonExistentContentPlugin()

Tests the retrieval of a non-existent plugin.

@covers ::getContentPlugin

File

tests/src/Kernel/GroupTypeTest.php, line 88

Class

GroupTypeTest
Tests the general behavior of group type entities.

Namespace

Drupal\Tests\group\Kernel

Code

public function testGetNonExistentContentPlugin() {
  $this
    ->expectException(PluginNotFoundException::class);
  $this
    ->expectExceptionMessage("Plugin ID 'fake_plugin_id' was not found.");
  $this->groupType
    ->getContentPlugin('fake_plugin_id');
}