Files
ik-codex/test/tests/Detective/LinePatternDetectorTest.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

31 lines
995 B
PHP

<?php
namespace IndifferentKetchup\Codex\Test\Tests\Detective;
use IndifferentKetchup\Codex\Detective\LinePatternDetector;
use PHPUnit\Framework\TestCase;
class LinePatternDetectorTest extends TestCase
{
public function testDetect(): void
{
$this->assertEquals(5 / 7, (new LinePatternDetector())
->setLogFile(new \IndifferentKetchup\Codex\Log\File\PathLogFile(__DIR__ . '/../../data/simple.log'))
->setPattern('/information/')
->detect()
);
$this->assertFalse((new LinePatternDetector())
->setLogFile(new \IndifferentKetchup\Codex\Log\File\PathLogFile(__DIR__ . '/../../data/simple.log'))
->setPattern('/missing/')
->detect()
);
$this->assertEquals(1, (new LinePatternDetector())
->setLogFile(new \IndifferentKetchup\Codex\Log\File\PathLogFile(__DIR__ . '/../../data/simple.log'))
->setPattern('/This/')
->detect()
);
}
}