/**
  * @dataProvider provideValidHandlersConfiguration
  */
 public function testHandlersConnected(array $handlers)
 {
     $this->extension->load(array('error_handler' => array('categories' => array('default' => array('handlers' => $handlers)))), $this->container);
     foreach (array_keys($handlers) as $handlerName) {
         $serviceId = 'error_handler.handler.default.' . $handlerName;
         $this->assertTrue($this->container->hasDefinition($serviceId));
         $def = $this->container->getDefinition($serviceId);
         $this->assertFalse($def->isPublic());
         $this->assertTrue($def->isLazy());
     }
 }
 /**
  * @return array
  */
 protected function setUp()
 {
     $this->container = new ContainerBuilder();
     $this->extension = new ErrorHandlerExtension();
     $this->bundle = new ErrorHandlerBundle();
     $this->container->setParameter('kernel.environment', 'test');
     $this->container->setParameter('kernel.root_dir', sys_get_temp_dir());
     $this->container->registerExtension($this->extension);
     $this->container->loadFromExtension($this->extension->getAlias());
     $this->bundle->build($this->container);
 }