Files
ik-codex/test/tests/Detective/SinglePatternDetectorTest.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
713 B
PHP

<?php
namespace IndifferentKetchup\Codex\Test\Tests\Detective;
use IndifferentKetchup\Codex\Detective\SinglePatternDetector;
use IndifferentKetchup\Codex\Log\File\StringLogFile;
use PHPUnit\Framework\TestCase;
class SinglePatternDetectorTest extends TestCase
{
public function testDetect(): void
{
$this->assertTrue((new SinglePatternDetector())
->setLogFile(new StringLogFile("You can detect this."))
->setPattern('/detect/')
->detect()
);
$this->assertFalse((new SinglePatternDetector())
->setLogFile(new StringLogFile("You cannot detect this."))
->setPattern('/missing/')
->detect()
);
}
}