aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/tests/Controller
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2025-01-10 11:56:17 +0100
committernextcloud-command <nextcloud-command@users.noreply.github.com>2025-01-22 16:29:36 +0000
commit7d8bb60bfe3b310b3c9909128a441a8336b638c8 (patch)
treea7ef74bdde97d05ce4961233f8e8b9095e96629c /apps/files/tests/Controller
parentfe4f40d4dbca96e61a6fdc299405cebedc0ea0cc (diff)
downloadnextcloud-server-7d8bb60bfe3b310b3c9909128a441a8336b638c8.tar.gz
nextcloud-server-7d8bb60bfe3b310b3c9909128a441a8336b638c8.zip
feat(files): add conversion action
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/tests/Controller')
-rw-r--r--apps/files/tests/Controller/ConversionApiControllerTest.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/tests/Controller/ConversionApiControllerTest.php b/apps/files/tests/Controller/ConversionApiControllerTest.php
index d2e68a8a32c..a2f1fccd978 100644
--- a/apps/files/tests/Controller/ConversionApiControllerTest.php
+++ b/apps/files/tests/Controller/ConversionApiControllerTest.php
@@ -78,12 +78,16 @@ class ConversionApiControllerTest extends TestCase {
$this->userFolder->method('getFirstNodeById')->with(42)->willReturn($this->file);
$this->userFolder->method('getRelativePath')->with($convertedFileAbsolutePath)->willReturn('/test.png');
+ $this->userFolder->method('get')->with('/test.png')->willReturn($this->file);
+
+ $this->file->method('getId')->willReturn(42);
$this->fileConversionManager->method('convert')->with($this->file, 'image/png', null)->willReturn($convertedFileAbsolutePath);
$actual = $this->conversionApiController->convert(42, 'image/png', null);
$expected = new DataResponse([
'path' => '/test.png',
+ 'fileId' => 42,
], Http::STATUS_CREATED);
$this->assertEquals($expected, $actual);