You are here

protected function PermissionEventTest::setUp in Organic groups 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/PermissionEventTest.php, line 53

Class

PermissionEventTest
Tests the implementations of the PermissionEvent in 'og' and 'og_ui'.

Namespace

Drupal\Tests\og\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this->eventDispatcher = $this->container
    ->get('event_dispatcher');

  // Create a group content entity type. The type and name of this bundle are
  // used to create the group content permissions.
  NodeType::create([
    'type' => 'test_group_content',
    'name' => 'Test Group Content',
  ])
    ->save();
}