diff --git a/tests/src/Kernel/RoleMapTest.php b/tests/src/Kernel/RoleMapTest.php index ffdc675..7cff818 100644 --- a/tests/src/Kernel/RoleMapTest.php +++ b/tests/src/Kernel/RoleMapTest.php @@ -28,6 +28,13 @@ public function testRoleMap() : void { // Create a new role and tell our plugin to map the role. $role = $this->createRole([], 'test'); $this->setPluginConfiguration('client_roles', [$role => $role]); + $this->setPluginConfiguration('ad_roles_disabled_amr', ['something']); + + $this->getPlugin()->mapRoles($account, ['userinfo' => ['ad_groups' => [], 'amr' => ['something']]]); + // Our account should not have the newly added role now, amr is disabled. + $this->assertEquals([ + AccountInterface::AUTHENTICATED_ROLE, + ], $account->getRoles()); $this->getPlugin()->mapRoles($account, ['userinfo' => ['ad_groups' => []]]); // Our account should have the newly added role now.