Add ScandalousTest

This commit is contained in:
2026-06-06 10:23:16 +02:00
parent ebf977cf48
commit 0eb94ccf55
5 changed files with 1955 additions and 3 deletions

28
tests/ScandalousTest.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace Scandalous\Tests;
use PHPUnit\Framework\TestCase;
use Scandalous\Scandalous;
use Scandalous\Contract\ProcessRunnerInterface;
use Scandalous\Engine\LiteParseExtractor;
final class ScandalousTest extends TestCase
{
public function testExtractWithMockProcessRunner(): void
{
$mockRunner = $this->createMock(ProcessRunnerInterface::class);
$mockRunner
->expects($this->once())
->method('run')
->willReturn('Mock extracted text content');
$extractor = new LiteParseExtractor($mockRunner);
$scandalous = new Scandalous($extractor);
$result = $scandalous->extract('path/to/pdffile.pdf');
$this->assertSame('Mock extracted text content', $result);
}
}