◆ createHandler()
Monolog\Handler\FlowdockHandlerTest::createHandler |
( |
|
$token = 'myToken' | ) |
|
|
private |
Definition at line 62 of file FlowdockHandlerTest.php.
References PHPMailer\PHPMailer\$token, and Monolog\Logger\DEBUG.
Referenced by Monolog\Handler\FlowdockHandlerTest\testWriteHeader().
65 $this->res =
fopen(
'php://memory',
'a');
66 $this->handler = $this->getMock(
67 '\Monolog\Handler\FlowdockHandler',
68 array(
'fsockopen',
'streamSetTimeout',
'closeSocket'),
72 $reflectionProperty = new \ReflectionProperty(
'\Monolog\Handler\SocketHandler',
'connectionString');
73 $reflectionProperty->setAccessible(
true);
74 $reflectionProperty->setValue($this->handler,
'localhost:1234');
76 $this->handler->expects($this->any())
78 ->will($this->returnValue($this->res));
79 $this->handler->expects($this->any())
80 ->method(
'streamSetTimeout')
81 ->will($this->returnValue(
true));
82 $this->handler->expects($this->any())
83 ->method(
'closeSocket')
84 ->will($this->returnValue(
true));
86 $this->handler->setFormatter(
new FlowdockFormatter(
'test_source',
'source@test.com'));
const DEBUG
Detailed debug information.
◆ setUp()
Monolog\Handler\FlowdockHandlerTest::setUp |
( |
| ) |
|
Definition at line 34 of file FlowdockHandlerTest.php.
36 if (!extension_loaded(
'openssl')) {
37 $this->markTestSkipped(
'This test requires openssl to run');
◆ testWriteContent()
Monolog\Handler\FlowdockHandlerTest::testWriteContent |
( |
|
$content | ) |
|
testWriteHeader
Definition at line 56 of file FlowdockHandlerTest.php.
58 $this->assertRegexp(
'/"source":"test_source"/', $content);
59 $this->assertRegexp(
'/"from_address":"source@test\.com"/', $content);
◆ testWriteHeader()
Monolog\Handler\FlowdockHandlerTest::testWriteHeader |
( |
| ) |
|
◆ $handler
Monolog\Handler\FlowdockHandlerTest::$handler |
|
private |
◆ $res
Monolog\Handler\FlowdockHandlerTest::$res |
|
private |
The documentation for this class was generated from the following file: