You are here

protected function OgRoleManagerTest::setUp in Organic groups 8

Same name in this branch
  1. 8 tests/src/Unit/OgRoleManagerTest.php \Drupal\Tests\og\Unit\OgRoleManagerTest::setUp()
  2. 8 tests/src/Kernel/OgRoleManagerTest.php \Drupal\Tests\og\Kernel\OgRoleManagerTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/OgRoleManagerTest.php, line 83

Class

OgRoleManagerTest
Tests create membership helper function.

Namespace

Drupal\Tests\og\Unit

Code

protected function setUp() : void {
  parent::setUp();
  $this->entityTypeId = $this
    ->randomMachineName();
  $this->bundle = $this
    ->randomMachineName();
  $this->entityTypeManager = $this
    ->prophesize(EntityTypeManagerInterface::class);
  $this->entityStorage = $this
    ->prophesize(EntityStorageInterface::class);
  $this->eventDispatcher = $this
    ->prophesize(EventDispatcherInterface::class);
  $this->ogRole = $this
    ->prophesize(OgRole::class);
  $this->ogRoleStorage = $this
    ->prophesize(EntityStorageInterface::class);
  $this->permissionManager = $this
    ->prophesize(PermissionManagerInterface::class);
  $this->entityTypeManager
    ->getStorage('og_role')
    ->willReturn($this->ogRoleStorage
    ->reveal());
}