public function GroupRoleSynchronizerTest::testGetGroupRoleIdsByUserRoles in Group 8
Same name and namespace in other branches
- 2.0.x tests/src/Unit/GroupRoleSynchronizerTest.php \Drupal\Tests\group\Unit\GroupRoleSynchronizerTest::testGetGroupRoleIdsByUserRoles()
@covers ::getGroupRoleIdsByUserRoles @depends testGetGroupRoleId
File
- tests/
src/ Unit/ GroupRoleSynchronizerTest.php, line 97
Class
- GroupRoleSynchronizerTest
- Tests the outsider group role synchronizer service.
Namespace
Drupal\Tests\group\UnitCode
public function testGetGroupRoleIdsByUserRoles() {
$this
->setUpConfigEntityStorage('group_type', [
'foo',
'bar',
]);
$expected = [
$this->groupRoleSynchronizer
->getGroupRoleId('foo', 'baz'),
$this->groupRoleSynchronizer
->getGroupRoleId('foo', 'ook'),
$this->groupRoleSynchronizer
->getGroupRoleId('bar', 'baz'),
$this->groupRoleSynchronizer
->getGroupRoleId('bar', 'ook'),
];
$this
->assertEquals($expected, $this->groupRoleSynchronizer
->getGroupRoleIdsByUserRoles([
'baz',
'ook',
]));
}