mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-10 15:14:14 +02:00
Added @covers annotations to everything
This commit is contained in:
@@ -16,6 +16,19 @@ use Monolog\Logger;
|
||||
|
||||
class GroupHandlerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Monolog\Handler\GroupHandler::__construct
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testConstructorOnlyTakesHandler()
|
||||
{
|
||||
new GroupHandler(array(new TestHandler(), "foo"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Monolog\Handler\GroupHandler::__construct
|
||||
* @covers Monolog\Handler\GroupHandler::handle
|
||||
*/
|
||||
public function testHandle()
|
||||
{
|
||||
$testHandlers = array(new TestHandler(), new TestHandler());
|
||||
@@ -29,6 +42,9 @@ class GroupHandlerTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Monolog\Handler\GroupHandler::handleBatch
|
||||
*/
|
||||
public function testHandleBatch()
|
||||
{
|
||||
$testHandlers = array(new TestHandler(), new TestHandler());
|
||||
@@ -40,4 +56,16 @@ class GroupHandlerTest extends TestCase
|
||||
$this->assertTrue(count($test->getRecords()) === 2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Monolog\Handler\GroupHandler::isHandling
|
||||
*/
|
||||
public function testIsHandling()
|
||||
{
|
||||
$testHandlers = array(new TestHandler(Logger::ERROR), new TestHandler(Logger::WARNING));
|
||||
$handler = new GroupHandler($testHandlers);
|
||||
$this->assertTrue($handler->isHandling($this->getRecord(Logger::ERROR)));
|
||||
$this->assertTrue($handler->isHandling($this->getRecord(Logger::WARNING)));
|
||||
$this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user