diff options
author | Robin Appelman <robin@icewind.nl> | 2021-03-18 19:16:28 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-03-23 20:02:15 +0300 |
commit | b8d64d67febdb533d134ed0595af7bb5a156521a (patch) | |
tree | 980f723064aa4de6964430ea92a9b108872e0394 /tests | |
parent | 549db744dc0454de1e3a35c8eea9506884e0da2d (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.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 d2bbf65965a..3c420f8a7c1 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()) |