@@ 362-374 (lines=13) @@ | ||
359 | $this->assertEquals('%doctrine_cache.array.class%', $definition->getClass()); |
|
360 | } |
|
361 | ||
362 | public function testLoadLogging() |
|
363 | { |
|
364 | $container = $this->loadContainer('dbal_logging', ['YamlBundle'], new DoctrineDBALLoggerPass()); |
|
365 | ||
366 | $definition = $container->getDefinition('doctrine.dbal.log_connection.configuration'); |
|
367 | $this->assertDICDefinitionMethodCallOnce($definition, 'setSQLLogger', array(new Reference('doctrine.dbal.logger'))); |
|
368 | ||
369 | $definition = $container->getDefinition('doctrine.dbal.profile_connection.configuration'); |
|
370 | $this->assertDICDefinitionMethodCallOnce($definition, 'setSQLLogger', array(new Reference('doctrine.dbal.logger.profiling.profile'))); |
|
371 | ||
372 | $definition = $container->getDefinition('doctrine.dbal.both_connection.configuration'); |
|
373 | $this->assertDICDefinitionMethodCallOnce($definition, 'setSQLLogger', array(new Reference('doctrine.dbal.logger.chain.both'))); |
|
374 | } |
|
375 | ||
376 | public function testLoadLoggingTag() |
|
377 | { |
|
@@ 376-386 (lines=11) @@ | ||
373 | $this->assertDICDefinitionMethodCallOnce($definition, 'setSQLLogger', array(new Reference('doctrine.dbal.logger.chain.both'))); |
|
374 | } |
|
375 | ||
376 | public function testLoadLoggingTag() |
|
377 | { |
|
378 | $container = $this->loadContainer('dbal_logging_tag', ['YamlBundle'], new DoctrineDBALLoggerPass()); |
|
379 | ||
380 | $definition = $container->getDefinition('doctrine.dbal.tag_connection.configuration'); |
|
381 | $this->assertDICDefinitionMethodCallOnce($definition, 'setSQLLogger', array(new Reference('doctrine.dbal.logger.chain.tag'))); |
|
382 | ||
383 | $definition = $container->getDefinition('doctrine.dbal.logger.chain.tag'); |
|
384 | $this->assertDICDefinitionMethodCallAt(0, $definition, 'addLogger', array(new Reference('logger.echo'))); |
|
385 | $this->assertDICDefinitionMethodCallAt(1, $definition, 'addLogger', array(new Reference('logger.debug'))); |
|
386 | } |
|
387 | ||
388 | public function testLoadLoggingAndTag() |
|
389 | { |