load() public method

Load the bundle configuration.
public load ( array $configs, ContainerBuilder $container )
$configs array
$container Symfony\Component\DependencyInjection\ContainerBuilder
 /**
  * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
  * @dataProvider provideBadConfiguration
  */
 public function testBadProvidersConfiguration(array $badProvidersConfig)
 {
     $this->configuration = new ContainerBuilder();
     $loader = new KnpUOAuth2ClientExtension(false);
     $config = array('providers' => $badProvidersConfig);
     $loader->load(array($config), $this->configuration);
 }
 public function testFacebookProviderMakesService()
 {
     $this->configuration = new ContainerBuilder();
     $loader = new KnpUOAuth2ClientExtension(false);
     $config = array('providers' => array('facebook' => array('client_id' => 'CLIENT_ID', 'client_secret' => 'SECRET', 'graph_api_version' => 'API_VERSION', 'redirect_route' => 'the_route_name', 'redirect_params' => array('route_params' => 'foo'))));
     $loader->load(array($config), $this->configuration);
     $definition = $this->configuration->getDefinition('knpu.oauth.facebook_provider');
     $factory = $definition->getFactory();
     // make sure the factory is correct
     $this->assertEquals(array(new Reference('knpu.oauth.provider_factory'), 'createProvider'), $factory);
     $this->assertEquals(array('League\\OAuth2\\Client\\Provider\\Facebook', array('clientId' => 'CLIENT_ID', 'clientSecret' => 'SECRET', 'graphApiVersion' => 'API_VERSION'), 'the_route_name', array('route_params' => 'foo')), $definition->getArguments());
 }
 /**
  * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
  * @dataProvider provideBadConfiguration
  */
 public function testBadClientsConfiguration(array $badClientsConfig)
 {
     $this->configuration = new ContainerBuilder();
     $loader = new KnpUOAuth2ClientExtension(false);
     $config = ['clients' => $badClientsConfig];
     $loader->load([$config], $this->configuration);
 }