From 8b271b8a123f0f0cbf3a3d81cf9cf3f99a2e642e Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 25 Oct 2021 16:16:55 +0200 Subject: Fix tests and avoid PHP errors in them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- tests/Core/Controller/JsControllerTest.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/Core/Controller/JsControllerTest.php') diff --git a/tests/Core/Controller/JsControllerTest.php b/tests/Core/Controller/JsControllerTest.php index 01228a6a93e..3f76e19efc9 100644 --- a/tests/Core/Controller/JsControllerTest.php +++ b/tests/Core/Controller/JsControllerTest.php @@ -102,6 +102,8 @@ class JsControllerTest extends TestCase { public function testGetFile() { $folder = $this->createMock(ISimpleFolder::class); $file = $this->createMock(ISimpleFile::class); + $file->method('getName')->willReturn('my name'); + $file->method('getMTime')->willReturn(42); $this->appData->method('getFolder') ->with('myapp') ->willReturn($folder); @@ -125,6 +127,8 @@ class JsControllerTest extends TestCase { public function testGetGzipFile() { $folder = $this->createMock(ISimpleFolder::class); $gzipFile = $this->createMock(ISimpleFile::class); + $gzipFile->method('getName')->willReturn('my name'); + $gzipFile->method('getMTime')->willReturn(42); $this->appData->method('getFolder') ->with('myapp') ->willReturn($folder); @@ -153,6 +157,8 @@ class JsControllerTest extends TestCase { public function testGetGzipFileNotFound() { $folder = $this->createMock(ISimpleFolder::class); $file = $this->createMock(ISimpleFile::class); + $file->method('getName')->willReturn('my name'); + $file->method('getMTime')->willReturn(42); $this->appData->method('getFolder') ->with('myapp') ->willReturn($folder); -- cgit v1.2.3