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

@@ -40,9 +40,9 @@ class StreamHandlerTest extends TestCase
{
$handle = fopen('php://memory', 'a+');
$handler = new StreamHandler($handle);
$this->assertTrue(is_resource($handle));
$this->assertTrue(\is_resource($handle));
$handler->close();
$this->assertTrue(is_resource($handle));
$this->assertTrue(\is_resource($handle));
}
/**
@@ -54,9 +54,9 @@ class StreamHandlerTest extends TestCase
$handler->handle($this->getRecord(Level::Warning, 'test'));
$stream = $handler->getStream();
$this->assertTrue(is_resource($stream));
$this->assertTrue(\is_resource($stream));
$handler->close();
$this->assertFalse(is_resource($stream));
$this->assertFalse(\is_resource($stream));
}
/**
@@ -69,17 +69,17 @@ class StreamHandlerTest extends TestCase
$handler->handle($this->getRecord(Level::Warning, 'testfoo'));
$stream = $handler->getStream();
$this->assertTrue(is_resource($stream));
$this->assertTrue(\is_resource($stream));
fseek($stream, 0);
$this->assertStringContainsString('testfoo', stream_get_contents($stream));
$serialized = serialize($handler);
$this->assertFalse(is_resource($stream));
$this->assertFalse(\is_resource($stream));
$handler = unserialize($serialized);
$handler->handle($this->getRecord(Level::Warning, 'testbar'));
$stream = $handler->getStream();
$this->assertTrue(is_resource($stream));
$this->assertTrue(\is_resource($stream));
fseek($stream, 0);
$contents = stream_get_contents($stream);
$this->assertStringNotContainsString('testfoo', $contents);
@@ -212,7 +212,7 @@ STRING;
#[DataProvider('provideNonExistingAndNotCreatablePath')]
public function testWriteNonExistingAndNotCreatablePath($nonExistingAndNotCreatablePath)
{
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
if (\defined('PHP_WINDOWS_VERSION_BUILD')) {
$this->markTestSkipped('Permissions checks can not run on windows');
}