You are here

public function GroupRoleSynchronizerTest::testGetGroupRoleIdsByGroupType in Group 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Unit/GroupRoleSynchronizerTest.php \Drupal\Tests\group\Unit\GroupRoleSynchronizerTest::testGetGroupRoleIdsByGroupType()

@covers ::getGroupRoleIdsByGroupType @depends testGetGroupRoleId

File

tests/src/Unit/GroupRoleSynchronizerTest.php, line 56

Class

GroupRoleSynchronizerTest
Tests the outsider group role synchronizer service.

Namespace

Drupal\Tests\group\Unit

Code

public function testGetGroupRoleIdsByGroupType() {
  $this
    ->setUpConfigEntityStorage('user_role', [
    'bar',
    'baz',
  ]);
  $expected = [
    $this->groupRoleSynchronizer
      ->getGroupRoleId('foo', 'bar'),
    $this->groupRoleSynchronizer
      ->getGroupRoleId('foo', 'baz'),
  ];
  $this
    ->assertEquals($expected, $this->groupRoleSynchronizer
    ->getGroupRoleIdsByGroupType('foo'));
}