runtime()->mapRoles([Role::TEAMER, Role::GROUPS_MANAGER]), ); } public function testImplicitRoleUserIsNotListed(): void { self::assertSame(['Administration'], $this->runtime()->mapRoles(['ROLE_USER', Role::ADMIN])); self::assertSame([], $this->runtime()->mapRoles(['ROLE_USER'])); } public function testUnknownRoleStaysVisible(): void { self::assertSame(['ROLE_LEGACY'], $this->runtime()->mapRoles(['ROLE_LEGACY'])); } private function runtime(): AppRuntime { return (new \ReflectionClass(AppRuntime::class))->newInstanceWithoutConstructor(); } }