ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
FilenameOverridePreProcessorTest.php
Go to the documentation of this file.
1<?php
2
20
21use PHPUnit\Framework\Attributes\BackupGlobals;
22use PHPUnit\Framework\Attributes\BackupStaticProperties;
23use PHPUnit\Framework\Attributes\PreserveGlobalState;
24use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
25use PHPUnit\Framework\Attributes\Test;
26use PHPUnit\Framework\Attributes\Small;
27
28require_once('./vendor/composer/vendor/autoload.php');
29
33use PHPUnit\Framework\TestCase;
34
40#[BackupGlobals(false)]
41#[BackupStaticProperties(false)]
42#[PreserveGlobalState(false)]
43#[RunTestsInSeparateProcesses]
45{
46 #[Test]
47
48 public function testProcessWhichShouldSucceed(): void
49 {
50 $filename = 'renamed.ogg';
51
53 $stream = Streams::ofString('Awesome stuff');
54 $result = $subject->process($stream, new Metadata($filename, $stream->getSize(), 'audio/ogg'));
55
56 $this->assertSame(ProcessingStatus::OK, $result->getCode());
57 $this->assertSame('Filename changed', $result->getMessage());
58 }
59}
$filename
Definition: buildRTE.php:78
Stream factory which enables the user to create streams without the knowledge of the concrete class.
Definition: Streams.php:32
static ofString(string $string)
Creates a new stream with an initial value.
Definition: Streams.php:41
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...