Files
ik-codex/test/tests/Printer/PatternModificationTest.php
indifferentketchup 66a2fcc5f3 Rename namespace Aternos\Codex to IndifferentKetchup\Codex
Bulk substitution across all PHP files in src/ and test/. Covers
namespace declarations, use statements, fully-qualified class
references, and @package PHPDoc tags. No logic changes.
2026-04-30 15:13:52 +00:00

26 lines
778 B
PHP

<?php
namespace IndifferentKetchup\Codex\Test\Tests\Printer;
use IndifferentKetchup\Codex\Log\File\StringLogFile;
use IndifferentKetchup\Codex\Log\Log;
use IndifferentKetchup\Codex\Printer\ModifiableDefaultPrinter;
use IndifferentKetchup\Codex\Printer\PatternModification;
use PHPUnit\Framework\TestCase;
class PatternModificationTest extends TestCase
{
public function testPrint(): void
{
$logFile = new StringLogFile("This is foo!");
$log = new Log();
$log->setLogFile($logFile);
$log->parse();
$printer = new ModifiableDefaultPrinter();
$printer->addModification(new PatternModification('/foo/', 'bar'));
$printer->setLog($log);
$this->assertEquals("This is bar!", trim($printer->print()));
}
}