/**
  * Loads a specific configuration.
  *
  * @param array            $config    An array of configuration values
  * @param ContainerBuilder $container A ContainerBuilder instance
  *
  * @throws \InvalidArgumentException When provided tag is not defined in this extension
  *
  * @api
  */
 public function load(array $config, ContainerBuilder $container)
 {
     // parse configuration
     $parsedConfiguration = $this->processConfiguration(new Configuration(), $config);
     // load services
     $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     $loader->load('services.yml');
     // build role collection
     $builder = new RoleCollectionBuilder();
     $roleCollectionDefinition = $container->getDefinition("becklyn.static_roles.role_collection");
     $roleCollectionDefinition->replaceArgument(0, $builder->prepareRoleCollection($parsedConfiguration["roles"]));
 }
 public function testTransformation()
 {
     $roles = ["a" => ["included_roles" => ["b"]], "b" => ["title" => "b", "description" => "desc"]];
     $builder = new RoleCollectionBuilder();
     $this->assertEquals(["ROLE_A" => ["included_roles" => ["ROLE_B"]], "ROLE_B" => ["title" => "b", "description" => "desc"]], $builder->prepareRoleCollection($roles));
 }