19declare(strict_types=1);
24use ILIAS\LegalDocuments\test\ContainerMock;
27use PHPUnit\Framework\TestCase;
30require_once __DIR__ .
'/../ContainerMock.php';
38 $this->assertInstanceOf(PreProcessor::class,
new PreProcessor($this->fail(...)));
43 $expected_value =
'Dummty content';
45 $instance =
new PreProcessor(
static function (
string $content) use (&$value):
void {
50 $this->mockMethod(FileStream::class,
'getContents', [], $expected_value),
51 new Metadata(
'dummy file name', 1234,
'text/html')
54 $this->assertSame($expected_value, $value);
55 $this->assertInstanceOf(ProcessingStatus::class, $result);
57 $this->assertSame(
'idontcare', $result->getMessage());
process(FileStream $stream, Metadata $metadata)
This method gets invoked by the file upload service to process the file with the help of the processo...
The base interface for all filesystem streams.