From 10dfdedcbd71c51fe3bd3532cb91762da3e84a58 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 25 Oct 2021 16:43:09 +0200 Subject: Fix errors from files applications tests on PHP 8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/files/tests/Controller/ApiControllerTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/files/tests') diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php index af2d16699c1..73728bd6a4a 100644 --- a/apps/files/tests/Controller/ApiControllerTest.php +++ b/apps/files/tests/Controller/ApiControllerTest.php @@ -165,7 +165,7 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $this->apiController->getThumbnail(0, 0, '')); } - public function testGetThumbnailInvaidImage() { + public function testGetThumbnailInvalidImage() { $file = $this->createMock(File::class); $this->userFolder->method('get') ->with($this->equalTo('unknown.jpg')) @@ -184,6 +184,8 @@ class ApiControllerTest extends TestCase { ->with($this->equalTo('known.jpg')) ->willReturn($file); $preview = $this->createMock(ISimpleFile::class); + $preview->method('getName')->willReturn('my name'); + $preview->method('getMTime')->willReturn(42); $this->preview->expects($this->once()) ->method('getPreview') ->with($this->equalTo($file), 10, 10, true) -- cgit v1.2.3