Neos\Flow\Tests\Unit\Security\Policy\PolicyServiceTest::getRoleReturnsTheSpecifiedRole PHP Method

getRoleReturnsTheSpecifiedRole() public method

    public function getRoleReturnsTheSpecifiedRole()
    {
        $this->mockPolicyConfiguration = ['roles' => ['Some.Package:SomeRole' => ['abstract' => true], 'Some.Package:SomeOtherRole' => ['parentRoles' => ['Some.Package:SomeRole']]]];
        $role = $this->policyService->getRole('Some.Package:SomeOtherRole');
        $this->assertInstanceOf(Role::class, $role);
        $this->assertSame('Some.Package:SomeOtherRole', $role->getIdentifier());
        $this->assertSame('Some.Package:SomeRole', $role->getParentRoles()['Some.Package:SomeRole']->getIdentifier());
    }