You are here

protected function GetGroupContentTest::setUp in Organic groups 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/Entity/GetGroupContentTest.php, line 52

Class

GetGroupContentTest
Tests getting the group content of a group.

Namespace

Drupal\Tests\og\Kernel\Entity

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installConfig([
    'og',
  ]);
  $this
    ->installEntitySchema('entity_test');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('og_membership');
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('system', 'sequences');

  /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
  $entity_type_manager = $this->container
    ->get('entity_type.manager');
  $this->entityTypeManager = $entity_type_manager;

  // Create group admin user.
  $this->groupAdmin = User::create([
    'name' => $this
      ->randomString(),
  ]);
  $this->groupAdmin
    ->save();
}