Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-03-07 16:04:21 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-03-09 11:44:36 +0300
commit85ba5adb337738748000c9367b0bbeb62e08564f (patch)
treec2621f00b40584df7e09c8b69da16af693392436 /tests
parent2d7d8ca12513c24d59da8b7262f7e8a9fceb9396 (diff)
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Template/JSCombinerTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php
index d5f7000e0a5..bec88801d6b 100644
--- a/tests/lib/Template/JSCombinerTest.php
+++ b/tests/lib/Template/JSCombinerTest.php
@@ -187,6 +187,10 @@ class JSCombinerTest extends \Test\TestCase {
$fileDeps->expects($this->once())->method('getContent')->willReturn('{}');
+ $folder->method('fileExists')
+ ->with('combine.js')
+ ->willReturn(true);
+
$folder->method('getFile')
->will($this->returnCallback(function($path) use ($file, $fileDeps) {
if ($path === 'combine.js') {
@@ -196,6 +200,7 @@ class JSCombinerTest extends \Test\TestCase {
if ($path === 'combine.js.deps') {
return $fileDeps;
}
+
$this->fail();
}));
@@ -221,6 +226,9 @@ class JSCombinerTest extends \Test\TestCase {
->willReturn($folder);
$folder->method('getName')
->willReturn('awesomeapp');
+ $folder->method('fileExists')
+ ->with('combine.js')
+ ->willReturn(true);
$file = $this->createMock(ISimpleFile::class);
@@ -263,6 +271,9 @@ class JSCombinerTest extends \Test\TestCase {
public function testIsCachedWithNotExistingFile() {
$fileName = 'combine.json';
$folder = $this->createMock(ISimpleFolder::class);
+ $folder->method('fileExists')
+ ->with('combine.js')
+ ->willReturn(true);
$file = $this->createMock(ISimpleFile::class);
$folder->method('getFile')
->with('combine.js.deps')
@@ -278,6 +289,9 @@ class JSCombinerTest extends \Test\TestCase {
public function testIsCachedWithOlderMtime() {
$fileName = 'combine.json';
$folder = $this->createMock(ISimpleFolder::class);
+ $folder->method('fileExists')
+ ->with('combine.js')
+ ->willReturn(true);
$file = $this->createMock(ISimpleFile::class);
$folder->method('getFile')
->with('combine.js.deps')
@@ -293,6 +307,9 @@ class JSCombinerTest extends \Test\TestCase {
public function testIsCachedWithoutContent() {
$fileName = 'combine.json';
$folder = $this->createMock(ISimpleFolder::class);
+ $folder->method('fileExists')
+ ->with('combine.js')
+ ->willReturn(true);
$file = $this->createMock(ISimpleFile::class);
$folder->method('getFile')
->with('combine.js.deps')