@@ -38,15 +38,15 @@ public function testIsHandling()
3838 /**
3939 * @dataProvider provideVerbosityMappingTests
4040 */
41- public function testVerbosityMapping ($ verbosity , $ level , $ isHandling )
41+ public function testVerbosityMapping ($ verbosity , $ level , $ isHandling, array $ map = array () )
4242 {
4343 $ output = $ this ->getMock ('Symfony\Component\Console\Output\OutputInterface ' );
4444 $ output
4545 ->expects ($ this ->atLeastOnce ())
4646 ->method ('getVerbosity ' )
4747 ->will ($ this ->returnValue ($ verbosity ))
4848 ;
49- $ handler = new ConsoleHandler ($ output );
49+ $ handler = new ConsoleHandler ($ output, true , $ map );
5050 $ this ->assertSame ($ isHandling , $ handler ->isHandling (array ('level ' => $ level )),
5151 '->isHandling returns correct value depending on console verbosity and log level '
5252 );
@@ -64,6 +64,12 @@ public function provideVerbosityMappingTests()
6464 array (OutputInterface::VERBOSITY_VERY_VERBOSE , Logger::DEBUG , false ),
6565 array (OutputInterface::VERBOSITY_DEBUG , Logger::DEBUG , true ),
6666 array (OutputInterface::VERBOSITY_DEBUG , Logger::EMERGENCY , true ),
67+ array (OutputInterface::VERBOSITY_NORMAL , Logger::NOTICE , true , array (
68+ OutputInterface::VERBOSITY_NORMAL => Logger::NOTICE
69+ )),
70+ array (OutputInterface::VERBOSITY_DEBUG , Logger::NOTICE , true , array (
71+ OutputInterface::VERBOSITY_NORMAL => Logger::NOTICE
72+ )),
6773 );
6874 }
6975
0 commit comments