1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 13:16:39 +02:00

Add some return type hints and fix up HandlerWrapper

This commit is contained in:
Jordi Boggiano
2016-03-01 17:35:54 +00:00
parent ba995ffd1e
commit 3d30ba5ecc
26 changed files with 89 additions and 87 deletions

View File

@@ -87,44 +87,4 @@ class HandlerWrapperTest extends TestCase
$this->assertEquals($result, $this->wrapper->handleBatch($records));
}
public function testPushProcessor()
{
$processor = function () {};
$this->handler->expects($this->once())
->method('pushProcessor')
->with($processor);
$this->assertEquals($this->wrapper, $this->wrapper->pushProcessor($processor));
}
public function testPopProcessor()
{
$processor = function () {};
$this->handler->expects($this->once())
->method('popProcessor')
->willReturn($processor);
$this->assertEquals($processor, $this->wrapper->popProcessor());
}
public function testSetFormatter()
{
$formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface');
$this->handler->expects($this->once())
->method('setFormatter')
->with($formatter);
$this->assertEquals($this->wrapper, $this->wrapper->setFormatter($formatter));
}
public function testGetFormatter()
{
$formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface');
$this->handler->expects($this->once())
->method('getFormatter')
->willReturn($formatter);
$this->assertEquals($formatter, $this->wrapper->getFormatter());
}
}