summaryrefslogtreecommitdiffstats
path: root/tests/Core/Controller/JsControllerTest.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2021-10-25 16:16:55 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2021-11-23 09:29:01 +0100
commit8b271b8a123f0f0cbf3a3d81cf9cf3f99a2e642e (patch)
tree2a9aab48581704506965f8ff7628d25e13fa0042 /tests/Core/Controller/JsControllerTest.php
parentcd72045433eafc8f73a620239dc5afa6a0a6d84d (diff)
downloadnextcloud-server-8b271b8a123f0f0cbf3a3d81cf9cf3f99a2e642e.tar.gz
nextcloud-server-8b271b8a123f0f0cbf3a3d81cf9cf3f99a2e642e.zip
Fix tests and avoid PHP errors in them
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/Core/Controller/JsControllerTest.php')
-rw-r--r--tests/Core/Controller/JsControllerTest.php6
1 files changed, 6 insertions, 0 deletions
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);