public function testVerbosityChanged() { $output = $this->getMock('Symfony\\Component\\Console\\Output\\OutputInterface'); $output->expects($this->at(0))->method('getVerbosity')->will($this->returnValue(OutputInterface::VERBOSITY_QUIET)); $output->expects($this->at(1))->method('getVerbosity')->will($this->returnValue(OutputInterface::VERBOSITY_DEBUG)); $handler = new ConsoleHandler($output); $this->assertFalse($handler->isHandling(array('level' => Logger::NOTICE)), 'when verbosity is set to quiet, the handler does not handle the log'); $this->assertTrue($handler->isHandling(array('level' => Logger::NOTICE)), 'since the verbosity of the output increased externally, the handler is now handling the log'); }