56 {
57 $useSSL = extension_loaded('openssl');
58 $args = array(
'testToken',
'us', $useSSL,
Logger::DEBUG,
true);
59 $this->resource = fopen('php://memory', 'a');
60 $this->handler = $this->getMock(
61 '\Monolog\Handler\InsightOpsHandler',
62 array('fsockopen', 'streamSetTimeout', 'closeSocket'),
63 $args
64 );
65
66 $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString');
67 $reflectionProperty->setAccessible(true);
68 $reflectionProperty->setValue($this->handler, 'localhost:1234');
69
70 $this->handler->expects($this->any())
71 ->method('fsockopen')
72 ->will($this->returnValue($this->resource));
73 $this->handler->expects($this->any())
74 ->method('streamSetTimeout')
75 ->will($this->returnValue(true));
76 $this->handler->expects($this->any())
77 ->method('closeSocket')
78 ->will($this->returnValue(true));
79 }
const DEBUG
Detailed debug information.