From 50e374c12fce6b0aeee62f42edcd18a573537a8f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 18 Mar 2021 17:16:28 +0100 Subject: only require user to be set in a query that handles tags Signed-off-by: Robin Appelman --- tests/lib/Files/Node/FolderTest.php | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'tests') 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()) -- cgit v1.2.3