You are here

protected function GroupTypeManagerTest::expectGroupMapRetrieval in Organic groups 8

Sets up an expectation that the group map will be retrieved from config.

Parameters

array $groups: The expected group map that will be returned by the mocked config.

5 calls to GroupTypeManagerTest::expectGroupMapRetrieval()
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::testIsGroup in tests/src/Unit/GroupTypeManagerTest.php
Tests checking if an entity is a group.
GroupTypeManagerTest::testRemoveGroup in tests/src/Unit/GroupTypeManagerTest.php
Tests removing a group.

File

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

Class

GroupTypeManagerTest
Tests the group manager.

Namespace

Drupal\Tests\og\Unit

Code

protected function expectGroupMapRetrieval(array $groups = []) {
  $this->configFactory
    ->get('og.settings')
    ->willReturn($this->config
    ->reveal())
    ->shouldBeCalled();
  $this->config
    ->get('groups')
    ->willReturn($groups)
    ->shouldBeCalled();
}