/**
  * Ensures that cyclic role hierarchies don't choke up the system
  */
 public function testCyclicRoleHierarchy()
 {
     $configuration = ["a" => ["included_roles" => ["b"]], "b" => ["included_roles" => ["a"]]];
     $roleCollection = new RoleCollection($configuration);
     $includedRoles = $roleCollection->getAllIncludedRoles(["a"]);
     $this->assertArrayHasKey("a", $includedRoles);
     $this->assertArrayHasKey("b", $includedRoles);
 }
 /**
  * {@inheritdoc}
  */
 protected function extractRoles(TokenInterface $token)
 {
     return $this->roleCollection->getAllIncludedRoles($token->getRoles());
 }