diff options
author | Vitor Mattos <vitor@php.rio> | 2023-01-03 11:55:15 -0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2023-01-03 12:08:39 -0300 |
commit | 5484a27cf2b81a6e3797a5b9365f270f15ac0b33 (patch) | |
tree | d84ddc81336caa2005ac8b1eb04cdfc5432ca406 /tests/php | |
parent | 6f3a8e6b8d48727b160b37edd9b548c937e6e9e6 (diff) |
Remove the possibility to change the allowed mime types by setting
https://github.com/nextcloud/spreed/pull/8492#discussion_r1058561108
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'tests/php')
-rw-r--r-- | tests/php/ConfigTest.php | 23 | ||||
-rw-r--r-- | tests/php/Service/RecordingServiceTest.php | 5 |
2 files changed, 2 insertions, 26 deletions
diff --git a/tests/php/ConfigTest.php b/tests/php/ConfigTest.php index a26cf75a8..555349e70 100644 --- a/tests/php/ConfigTest.php +++ b/tests/php/ConfigTest.php @@ -454,27 +454,4 @@ class ConfigTest extends TestCase { $this->assertEquals($now, $decoded->iat); $this->assertEquals('https://domain.invalid/nextcloud', $decoded->iss); } - - /** - * @dataProvider dataGetRecordingAllowedMimes - */ - public function testGetRecordingAllowedMimes($settings, $expected): void { - /** @var MockObject|IConfig $config */ - $config = $this->createMock(IConfig::class); - $config - ->expects($this->once()) - ->method('getAppValue') - ->willReturn(json_encode($settings)); - $helper = $this->createConfig($config); - $actual = $helper->getRecordingAllowedMimes(); - $this->assertEquals($expected, $actual); - } - - public function dataGetRecordingAllowedMimes(): array { - return [ - ['', Config::DEFAULT_ALLOWED_RECORDING_FORMATS], - [[], Config::DEFAULT_ALLOWED_RECORDING_FORMATS], - [['audio/ogg' => ['ogg']], ['audio/ogg' => ['ogg']]], - ]; - } } diff --git a/tests/php/Service/RecordingServiceTest.php b/tests/php/Service/RecordingServiceTest.php index c2593054e..b259f579c 100644 --- a/tests/php/Service/RecordingServiceTest.php +++ b/tests/php/Service/RecordingServiceTest.php @@ -98,10 +98,9 @@ class RecordingServiceTest extends TestCase { public function testValidateFileFormat(string $fileName, string $content, string $exceptionMessage):void { if ($exceptionMessage) { $this->expectExceptionMessage($exceptionMessage); + } else { + $this->expectNotToPerformAssertions(); } - $this->config->expects($this->once()) - ->method('getRecordingAllowedMimes') - ->willReturn(['audio/ogg' => ['ogg']]); $this->recordingService->validateFileFormat($fileName, $content); } |