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.
26 lines
778 B
PHP
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()));
|
|
}
|
|
}
|