public function GroupRoleStorageTest::testLoadSynchronizedByUserRoles in Group 8
Same name and namespace in other branches
- 2.0.x tests/src/Kernel/GroupRoleStorageTest.php \Drupal\Tests\group\Kernel\GroupRoleStorageTest::testLoadSynchronizedByUserRoles()
Tests the loading of synchronized group roles by user roles.
@covers ::loadSynchronizedByUserRoles
File
- tests/
src/ Kernel/ GroupRoleStorageTest.php, line 109
Class
- GroupRoleStorageTest
- Tests the behavior of group role storage handler.
Namespace
Drupal\Tests\group\KernelCode
public function testLoadSynchronizedByUserRoles() {
$actual = array_keys($this->storage
->loadSynchronizedByUserRoles([
'test',
]));
$expected = [
$this->groupRoleSynchronizer
->getGroupRoleId('default', 'test'),
$this->groupRoleSynchronizer
->getGroupRoleId('other', 'test'),
];
$this
->assertEqualsCanonicalizing($expected, $actual, 'Can load synchronized group roles by user roles.');
}