1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-20 11:51:32 +02:00

Use fully-qualified name for native functions (#1887)

This commit is contained in:
Christoph Dreis
2024-06-28 10:45:25 +02:00
committed by GitHub
parent 4e03d25f6d
commit 3ba77d1d39
90 changed files with 246 additions and 245 deletions

View File

@@ -198,7 +198,7 @@ class SocketHandlerTest extends TestCase
$callback = function ($string) use ($res) {
fclose($res);
return strlen('Hello');
return \strlen('Hello');
};
$this->handler->expects($this->exactly(1))
@@ -249,7 +249,7 @@ class SocketHandlerTest extends TestCase
$this->writeRecord('Hello world');
$this->assertIsResource($this->res);
$this->handler->close();
$this->assertFalse(is_resource($this->res), "Expected resource to be closed after closing handler");
$this->assertFalse(\is_resource($this->res), "Expected resource to be closed after closing handler");
}
public function testCloseDoesNotClosePersistentSocket()
@@ -257,9 +257,9 @@ class SocketHandlerTest extends TestCase
$this->setMockHandler();
$this->handler->setPersistent(true);
$this->writeRecord('Hello world');
$this->assertTrue(is_resource($this->res));
$this->assertTrue(\is_resource($this->res));
$this->handler->close();
$this->assertTrue(is_resource($this->res));
$this->assertTrue(\is_resource($this->res));
}
public function testAvoidInfiniteLoopWhenNoDataIsWrittenForAWritingTimeoutSeconds()
@@ -308,25 +308,25 @@ class SocketHandlerTest extends TestCase
->setConstructorArgs(['localhost:1234'])
->getMock();
if (!in_array('fsockopen', $methods)) {
if (!\in_array('fsockopen', $methods)) {
$this->handler->expects($this->any())
->method('fsockopen')
->willReturn($this->res);
}
if (!in_array('pfsockopen', $methods)) {
if (!\in_array('pfsockopen', $methods)) {
$this->handler->expects($this->any())
->method('pfsockopen')
->willReturn($this->res);
}
if (!in_array('streamSetTimeout', $methods)) {
if (!\in_array('streamSetTimeout', $methods)) {
$this->handler->expects($this->any())
->method('streamSetTimeout')
->willReturn(true);
}
if (!in_array('streamSetChunkSize', $methods)) {
if (!\in_array('streamSetChunkSize', $methods)) {
$this->handler->expects($this->any())
->method('streamSetChunkSize')
->willReturn(8192);