ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
FilenameOverridePreProcessorTest.php
Go to the documentation of this file.
1<?php
2
4
5require_once('./libs/composer/vendor/autoload.php');
6
10use PHPUnit\Framework\TestCase;
11
23{
24
30 {
31 $filename = 'renamed.ogg';
32
34 $stream = Streams::ofString('Awesome stuff');
35 $result = $subject->process($stream, new Metadata($filename, $stream->getSize(), 'audio/ogg'));
36
37 $this->assertSame(ProcessingStatus::OK, $result->getCode());
38 $this->assertSame('Filename changed', $result->getMessage());
39 }
40}
$result
An exception for terminatinating execution or to throw for unit testing.
static ofString($string)
Creates a new stream with an initial value.
Definition: Streams.php:29
$stream
PHP stream implementation.