Files
ik-codex/test/tests/Log/File/StringLogFileTest.php
indifferentketchup 8ae7da5259 Expose source path on LogFileInterface
Add LogFileInterface::getPath(): ?string so detectors can dispatch on a
filename hint when the original path is known. Default implementation on
the abstract LogFile base returns null; PathLogFile records its
constructor argument. StringLogFile and StreamLogFile inherit the null
default. Tests cover both the path and null-fallback cases.
2026-04-30 20:29:21 +00:00

25 lines
554 B
PHP

<?php
namespace IndifferentKetchup\Codex\Test\Tests\Log\File;
use IndifferentKetchup\Codex\Log\File\StringLogFile;
use PHPUnit\Framework\TestCase;
class StringLogFileTest extends TestCase
{
public function testGetContent(): void
{
$content = uniqid();
$logFile = new StringLogFile($content);
$this->assertEquals($content, $logFile->getContent());
}
public function testGetPathReturnsNull(): void
{
$logFile = new StringLogFile("anything");
$this->assertNull($logFile->getPath());
}
}