ILIAS  trunk Revision v5.2.0beta1-34115-g3a2438be29
ILIAS\FileUpload\Processor\FilenameOverridePreProcessorTest Class Reference

Class FilenameOverridePreProcessorTest. More...

+ Inheritance diagram for ILIAS\FileUpload\Processor\FilenameOverridePreProcessorTest:
+ Collaboration diagram for ILIAS\FileUpload\Processor\FilenameOverridePreProcessorTest:

Public Member Functions

 testProcessWhichShouldSucceed ()
 

Detailed Description

Class FilenameOverridePreProcessorTest.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

disabled disabled disabled

Definition at line 22 of file FilenameOverridePreProcessorTest.php.

Member Function Documentation

◆ testProcessWhichShouldSucceed()

ILIAS\FileUpload\Processor\FilenameOverridePreProcessorTest::testProcessWhichShouldSucceed ( )

Definition at line 28 of file FilenameOverridePreProcessorTest.php.

References $filename, ILIAS\Filesystem\Stream\Streams\ofString(), and ILIAS\FileUpload\DTO\ProcessingStatus\OK.

29  {
30  $filename = 'renamed.ogg';
31 
32  $subject = new FilenameSanitizerPreProcessor($filename);
33  $stream = Streams::ofString('Awesome stuff');
34  $result = $subject->process($stream, new Metadata($filename, $stream->getSize(), 'audio/ogg'));
35 
36  $this->assertSame(ProcessingStatus::OK, $result->getCode());
37  $this->assertSame('Filename changed', $result->getMessage());
38  }
$filename
Definition: buildRTE.php:78
static ofString(string $string)
Creates a new stream with an initial value.
Definition: Streams.php:41
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: