public function testThatFacebookAdapterServiceIsCreated()
 {
     $config = [FacebookAdapterConfiguration::CONFIG_NODE_NAME_ADAPTER_SESSION_NAMESPACE => uniqid(), FacebookApplicationConfiguration::CONFIG_NODE_NAME_APPLICATION_ID => uniqid(), FacebookApplicationConfiguration::CONFIG_NODE_NAME_SECRET => uniqid(), FacebookApplicationConfiguration::CONFIG_NODE_NAME_FILE_UPLOAD => true, FacebookApplicationConfiguration::CONFIG_NODE_NAME_TRUST_PROXY_HEADERS => true];
     $facebookAdapterServiceId = uniqid();
     $facebookExtension = new FacebookExtension();
     $container = new ContainerBuilder();
     $container->set('session', $this->getContainer()->get('session'));
     $this->assertFalse($container->has($facebookAdapterServiceId));
     $facebookExtension->createFacebookAdapterService($config, $facebookAdapterServiceId, $container);
     $this->assertTrue($container->has($facebookAdapterServiceId));
     $this->assertInstanceOf('Laelaps\\Bundle\\Facebook\\FacebookAdapter', $container->get($facebookAdapterServiceId));
 }
 /**
  * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
  * @param string $providerKey
  * @param array config
  * @return string
  */
 public function createFacebookAdapter(ContainerBuilder $container, $providerKey, array $config)
 {
     if (isset($config[FacebookAdapterConfiguration::CONFIG_NODE_NAME_ADAPTER_SERVICE_ALIAS])) {
         $facebookAdapterId = $config[FacebookAdapterConfiguration::CONFIG_NODE_NAME_ADAPTER_SERVICE_ALIAS];
     } else {
         $facebookAdapterId = $this->namespaceServiceId('facebook_adapter', $providerKey);
     }
     $this->facebookExtension->createFacebookAdapterService($config, $facebookAdapterId, $container);
     return $facebookAdapterId;
 }