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:
authorRobin Appelman <robin@icewind.nl>2021-03-18 19:16:28 +0300
committerRobin Appelman <robin@icewind.nl>2021-03-18 19:16:28 +0300
commit50e374c12fce6b0aeee62f42edcd18a573537a8f (patch)
treed832c977b69aeda8ab22f21a209ccb485d129e64 /tests
parentf8bca545df7cc31b4ace6f9af9294cc182bd401e (diff)
only require user to be set in a query that handles tags
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/Node/FolderTest.php27
1 files changed, 11 insertions, 16 deletions
diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php
index 1ba052b8de4..6d3367ac09e 100644
--- a/tests/lib/Files/Node/FolderTest.php
+++ b/tests/lib/Files/Node/FolderTest.php
@@ -305,10 +305,9 @@ class FolderTest extends NodeTest {
->willReturn('foo');
$cache->expects($this->once())
- ->method('search')
- ->with('%qw%')
+ ->method('searchQuery')
->willReturn([
- ['fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']
+ new CacheEntry(['fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain'])
]);
$root->expects($this->once())
@@ -358,11 +357,10 @@ class FolderTest extends NodeTest {
->willReturn($cache);
$cache->expects($this->once())
- ->method('search')
- ->with('%qw%')
+ ->method('searchQuery')
->willReturn([
- ['fileid' => 3, 'path' => 'files/foo', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain'],
- ['fileid' => 3, 'path' => 'files_trashbin/foo2.d12345', 'name' => 'foo2.d12345', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain'],
+ new CacheEntry(['fileid' => 3, 'path' => 'files/foo', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']),
+ new CacheEntry(['fileid' => 3, 'path' => 'files_trashbin/foo2.d12345', 'name' => 'foo2.d12345', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']),
]);
$root->expects($this->once())
@@ -409,10 +407,9 @@ class FolderTest extends NodeTest {
->willReturn($cache);
$cache->expects($this->once())
- ->method('search')
- ->with('%qw%')
+ ->method('searchQuery')
->willReturn([
- ['fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']
+ new CacheEntry(['fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain'])
]);
$root->expects($this->once())
@@ -475,17 +472,15 @@ class FolderTest extends NodeTest {
->willReturn($subCache);
$cache->expects($this->once())
- ->method('search')
- ->with('%qw%')
+ ->method('searchQuery')
->willReturn([
- ['fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']
+ new CacheEntry(['fileid' => 3, 'path' => 'foo/qwerty', 'name' => 'qwerty', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain'])
]);
$subCache->expects($this->once())
- ->method('search')
- ->with('%qw%')
+ ->method('searchQuery')
->willReturn([
- ['fileid' => 4, 'path' => 'asd/qweasd', 'name' => 'qweasd', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']
+ new CacheEntry(['fileid' => 4, 'path' => 'asd/qweasd', 'name' => 'qweasd', 'size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain'])
]);
$root->expects($this->once())