◆ setUp()
Monolog\Handler\HandlerWrapperTest::setUp |
( |
| ) |
|
Definition at line 28 of file HandlerWrapperTest.php.
29 {
30 parent::setUp();
31 $this->handler = $this->getMock('Monolog\\Handler\\HandlerInterface');
32 $this->wrapper = new HandlerWrapper($this->handler);
33 }
◆ testGetFormatter()
Monolog\Handler\HandlerWrapperTest::testGetFormatter |
( |
| ) |
|
Definition at line 121 of file HandlerWrapperTest.php.
122 {
123 $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface');
124 $this->handler->expects($this->once())
125 ->method('getFormatter')
126 ->willReturn($formatter);
127
128 $this->assertEquals($formatter, $this->wrapper->getFormatter());
129 }
◆ testHandle()
Monolog\Handler\HandlerWrapperTest::testHandle |
( |
|
$result | ) |
|
- Parameters
-
$result | @dataProvider trueFalseDataProvider |
Definition at line 65 of file HandlerWrapperTest.php.
66 {
68 $this->handler->expects($this->once())
69 ->method('handle')
70 ->with($record)
72
73 $this->assertEquals(
$result, $this->wrapper->handle($record));
74 }
getRecord($level=Logger::WARNING, $message='test', $context=array())
References $result, and Monolog\TestCase\getRecord().
◆ testHandleBatch()
Monolog\Handler\HandlerWrapperTest::testHandleBatch |
( |
|
$result | ) |
|
◆ testIsHandling()
Monolog\Handler\HandlerWrapperTest::testIsHandling |
( |
|
$result | ) |
|
- Parameters
-
$result | @dataProvider trueFalseDataProvider |
Definition at line 50 of file HandlerWrapperTest.php.
51 {
53 $this->handler->expects($this->once())
54 ->method('isHandling')
55 ->with($record)
57
58 $this->assertEquals(
$result, $this->wrapper->isHandling($record));
59 }
References $result, and Monolog\TestCase\getRecord().
◆ testPopProcessor()
Monolog\Handler\HandlerWrapperTest::testPopProcessor |
( |
| ) |
|
Definition at line 101 of file HandlerWrapperTest.php.
102 {
103 $processor = function () {};
104 $this->handler->expects($this->once())
105 ->method('popProcessor')
106 ->willReturn($processor);
107
108 $this->assertEquals($processor, $this->wrapper->popProcessor());
109 }
◆ testPushProcessor()
Monolog\Handler\HandlerWrapperTest::testPushProcessor |
( |
| ) |
|
Definition at line 91 of file HandlerWrapperTest.php.
92 {
93 $processor = function () {};
94 $this->handler->expects($this->once())
95 ->method('pushProcessor')
96 ->with($processor);
97
98 $this->assertEquals($this->wrapper, $this->wrapper->pushProcessor($processor));
99 }
◆ testSetFormatter()
Monolog\Handler\HandlerWrapperTest::testSetFormatter |
( |
| ) |
|
Definition at line 111 of file HandlerWrapperTest.php.
112 {
113 $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface');
114 $this->handler->expects($this->once())
115 ->method('setFormatter')
116 ->with($formatter);
117
118 $this->assertEquals($this->wrapper, $this->wrapper->setFormatter($formatter));
119 }
◆ trueFalseDataProvider()
Monolog\Handler\HandlerWrapperTest::trueFalseDataProvider |
( |
| ) |
|
- Returns
- array
Definition at line 38 of file HandlerWrapperTest.php.
39 {
40 return array(
41 array(true),
42 array(false),
43 );
44 }
◆ $handler
Monolog\Handler\HandlerWrapperTest::$handler |
|
private |
◆ $wrapper
Monolog\Handler\HandlerWrapperTest::$wrapper |
|
private |
The documentation for this class was generated from the following file: