36 if (!extension_loaded(
'openssl')) {
37 $this->markTestSkipped(
'This test requires openssl to run');
46 $content = fread($this->res, 1024);
48 $this->assertRegexp(
'/POST \/v1\/messages\/team_inbox\/.* HTTP\/1.1\\r\\nHost: api.flowdock.com\\r\\nContent-Type: application\/json\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content);
58 $this->assertRegexp(
'/"source":"test_source"/', $content);
59 $this->assertRegexp(
'/"from_address":"source@test\.com"/', $content);
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.
getRecord($level=Logger::WARNING, $message='test', $context=array())
testWriteContent($content)
testWriteHeader
Create styles array
The data for the language used.
const CRITICAL
Critical conditions.
createHandler($token='myToken')