mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 20:57:36 +02:00
Yet another CS fix on SocketHandlerTest
This commit is contained in:
@@ -121,13 +121,14 @@ class SocketHandlerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->setMockHandler(array('fwrite'));
|
$this->setMockHandler(array('fwrite'));
|
||||||
|
|
||||||
$callback = function($arg) {
|
$callback = function($arg)
|
||||||
$map = array(
|
{
|
||||||
'Hello world' => 6,
|
$map = array(
|
||||||
'world' => false,
|
'Hello world' => 6,
|
||||||
);
|
'world' => false,
|
||||||
return $map[$arg];
|
);
|
||||||
};
|
return $map[$arg];
|
||||||
|
};
|
||||||
|
|
||||||
$this->handler->expects($this->exactly(2))
|
$this->handler->expects($this->exactly(2))
|
||||||
->method('fwrite')
|
->method('fwrite')
|
||||||
@@ -143,13 +144,14 @@ class SocketHandlerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->setMockHandler(array('fwrite', 'stream_get_meta_data'));
|
$this->setMockHandler(array('fwrite', 'stream_get_meta_data'));
|
||||||
|
|
||||||
$callback = function($arg) {
|
$callback = function($arg)
|
||||||
$map = array(
|
{
|
||||||
'Hello world' => 6,
|
$map = array(
|
||||||
'world' => 5,
|
'Hello world' => 6,
|
||||||
);
|
'world' => 5,
|
||||||
return $map[$arg];
|
);
|
||||||
};
|
return $map[$arg];
|
||||||
|
};
|
||||||
|
|
||||||
$this->handler->expects($this->exactly(1))
|
$this->handler->expects($this->exactly(1))
|
||||||
->method('fwrite')
|
->method('fwrite')
|
||||||
@@ -170,10 +172,11 @@ class SocketHandlerTest extends TestCase
|
|||||||
$this->setMockHandler(array('fwrite', 'stream_get_meta_data'));
|
$this->setMockHandler(array('fwrite', 'stream_get_meta_data'));
|
||||||
|
|
||||||
$res = $this->res;
|
$res = $this->res;
|
||||||
$callback = function($string) use ($res) {
|
$callback = function($string) use ($res)
|
||||||
fclose($res);
|
{
|
||||||
return strlen('Hello');
|
fclose($res);
|
||||||
};
|
return strlen('Hello');
|
||||||
|
};
|
||||||
|
|
||||||
$this->handler->expects($this->exactly(1))
|
$this->handler->expects($this->exactly(1))
|
||||||
->method('fwrite')
|
->method('fwrite')
|
||||||
@@ -199,13 +202,14 @@ class SocketHandlerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->setMockHandler(array('fwrite'));
|
$this->setMockHandler(array('fwrite'));
|
||||||
|
|
||||||
$callback = function($arg) {
|
$callback = function($arg)
|
||||||
$map = array(
|
{
|
||||||
'Hello world' => 6,
|
$map = array(
|
||||||
'world' => 5,
|
'Hello world' => 6,
|
||||||
);
|
'world' => 5,
|
||||||
return $map[$arg];
|
);
|
||||||
};
|
return $map[$arg];
|
||||||
|
};
|
||||||
|
|
||||||
$this->handler->expects($this->exactly(2))
|
$this->handler->expects($this->exactly(2))
|
||||||
->method('fwrite')
|
->method('fwrite')
|
||||||
|
Reference in New Issue
Block a user