You are here

protected function GroupTypeManagerTest::createGroupManager in Organic groups 8

Creates a group manager instance with a mock config factory.

Return value

\Drupal\og\GroupTypeManagerInterface Returns the group manager.

6 calls to GroupTypeManagerTest::createGroupManager()
GroupTypeManagerTest::testAddGroupExisting in tests/src/Unit/GroupTypeManagerTest.php
Tests adding an existing group.
GroupTypeManagerTest::testAddGroupNew in tests/src/Unit/GroupTypeManagerTest.php
Tests adding a new group.
GroupTypeManagerTest::testGetGroupBundleIdsByEntityType in tests/src/Unit/GroupTypeManagerTest.php
Tests getting all the groups IDs of an entity type.
GroupTypeManagerTest::testInstance in tests/src/Unit/GroupTypeManagerTest.php
Tests getting an instance of the group manager.
GroupTypeManagerTest::testIsGroup in tests/src/Unit/GroupTypeManagerTest.php
Tests checking if an entity is a group.

... See full list

File

tests/src/Unit/GroupTypeManagerTest.php, line 318

Class

GroupTypeManagerTest
Tests the group manager.

Namespace

Drupal\Tests\og\Unit

Code

protected function createGroupManager() {
  return new GroupTypeManager($this->configFactory
    ->reveal(), $this->entityTypeManager
    ->reveal(), $this->entityTypeBundleInfo
    ->reveal(), $this->eventDispatcher
    ->reveal(), $this->cache
    ->reveal(), $this->permissionManager
    ->reveal(), $this->ogRoleManager
    ->reveal(), $this->routeBuilder
    ->reveal(), $this->groupAudienceHelper
    ->reveal());
}