Inheritance: extends Symfony\Component\HttpKernel\DependencyInjection\Extension
Ejemplo n.º 1
0
 /**
  * @expectedException \RuntimeException
  */
 public function test_it_throws_an_exception_if_aop_without_jms_bundle()
 {
     $definitionArgument = Argument::type('Symfony\\Component\\DependencyInjection\\Definition');
     $builder = $this->createBuilder();
     $builder->setDefinition(Argument::any(), $definitionArgument)->willReturn(null);
     $builder->setParameter(Argument::any(), Argument::any())->shouldBeCalled();
     $this->extension->load(['tolerance' => ['aop' => null]], $builder->reveal());
 }
Ejemplo n.º 2
0
 public function test_it_do_not_register_the_buffered_runner_termination_listener()
 {
     $definitionArgument = Argument::type('Symfony\\Component\\DependencyInjection\\Definition');
     $builder = $this->createBuilder();
     $builder->addResource(Argument::type('Symfony\\Component\\Config\\Resource\\ResourceInterface'))->shouldBeCalled();
     $builder->setDefinition(Argument::any(), $definitionArgument)->willReturn(null);
     $builder->setParameter(Argument::any(), Argument::any())->shouldBeCalled();
     $builder->setDefinition('tolerance.operation_runner_listeners.buffered_termination', Argument::any())->shouldNotBeCalled();
     $this->extension->load(['tolerance' => ['operation_runner_listener' => false]], $builder->reveal());
 }
Ejemplo n.º 3
0
 public function test_it_adds_the_request_listener_when_configured()
 {
     $builder = $this->createBuilder();
     $builder->setDefinition('tolerance.metrics.listener.request_ended.send_time_to_publishers', Argument::any())->shouldBeCalled();
     $this->extension->load(['tolerance' => ['metrics' => ['request' => null]]], $builder->reveal());
 }