diff options
author | Robin Appelman <robin@icewind.nl> | 2021-03-18 17:16:28 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-03-18 17:16:28 +0100 |
commit | 50e374c12fce6b0aeee62f42edcd18a573537a8f (patch) | |
tree | d832c977b69aeda8ab22f21a209ccb485d129e64 /tests | |
parent | f8bca545df7cc31b4ace6f9af9294cc182bd401e (diff) | |
download | nextcloud-server-50e374c12fce6b0aeee62f42edcd18a573537a8f.tar.gz nextcloud-server-50e374c12fce6b0aeee62f42edcd18a573537a8f.zip |
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.php | 27 |
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()) |