Files
ik-codex/test/tests/Detective/SinglePatternDetectorTest.php
indifferentketchup 7c7fe5ca80
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 32s
Tests / Run tests on PHP v8.5 (push) Failing after 2s
Initial import from aternosorg/codex-minecraft
2026-04-30 09:56:57 -05:00

26 lines
680 B
PHP

<?php
namespace Aternos\Codex\Test\Tests\Detective;
use Aternos\Codex\Detective\SinglePatternDetector;
use Aternos\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()
);
}
}