public function testLoadTaggedIdentityTypes()
 {
     $this->extension->load(array(), $this->container);
     $this->compilerPass->process($this->container);
     $this->mock($this->container)->call('findTaggedServiceIds')->withArguments("llsaws.identity.type")->once()->call('getDefinition')->withArguments("llsaws.identity.manager")->once();
     $this->assert->object($definition = $this->container->getDefinition("llsaws.identity.manager"))->array($methods = $definition->getMethodCalls())->hasSize(1)->array($methods[0])->hasSize(2)->isEqualTo(array("addType", array("user", new Reference("llsaws.identity.type.user"))));
 }
 /**
  * Load queues from user configuration
  *
  * @param ContainerBuilder $container SF2 Container Builder
  * @param array            $config    Configuration array
  *
  * @return {$this}
  */
 public function loadQueues(ContainerBuilder $container, array $config)
 {
     foreach ($config as $name => $attributes) {
         $container->setDefinition(self::getQueueServiceKey($name), new Definition($container->getParameter('llssqs.model.queue.class'), array(new Reference(LLSAWSExtension::getServiceServiceKey($attributes['service'])), new Reference('llssqs.model.message.factory'), $attributes['name'])));
     }
     return $this;
 }
 public function testConfigOverridesServices()
 {
     $configs = array(array("services" => array("fake_service" => array("type" => "fake", "identity" => "jeremy"))), array("services" => array("fake_service" => array("identity" => "jonathan"))));
     $this->extension->load($configs, $this->container);
     $this->assert->boolean($this->container->hasDefinition($this->root . '.services.fake_service'))->isTrue()->if($definition = $this->container->getDefinition($this->root . '.services.fake_service'))->then->string($definition->getClass())->isEqualTo('LLS\\Bundle\\AWSBundle\\Interfaces\\ServiceInterface')->string($definition->getFactoryService())->isEqualTo('llsaws.service.manager')->string($definition->getFactoryMethod())->isEqualTo('create')->if($arguments = $definition->getArguments())->then->array($arguments)->hasSize(2)->string($arguments[0])->isEqualTo('fake')->array($arguments[1])->hasSize(2)->isEqualTo(array(new Reference("llsaws.identities.jonathan"), new Reference('llsaws.client.factory')));
 }