diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-07-18 15:06:55 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-07-26 12:29:19 +0200 |
commit | 0487144b2679f83f9a6b59b55561af062f692836 (patch) | |
tree | e2bd28fe000bb4fba8aed4f657ce16dbc2c40621 /apps | |
parent | b2341cdfd02b3e8ad90f8ae41320f708c3d54bb6 (diff) | |
download | nextcloud-server-0487144b2679f83f9a6b59b55561af062f692836.tar.gz nextcloud-server-0487144b2679f83f9a6b59b55561af062f692836.zip |
Remove deprecated searchByTag
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/tests/CacheTest.php | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php index c891f56f3d3..7bcb707a82b 100644 --- a/apps/files_sharing/tests/CacheTest.php +++ b/apps/files_sharing/tests/CacheTest.php @@ -238,96 +238,6 @@ class CacheTest extends TestCase { $this->verifyFiles($check, $results); } - /** - * Test searching by tag - */ - function testSearchByTag() { - $userId = \OC::$server->getUserSession()->getUser()->getUId(); - $id1 = $this->sharedCache->get('bar.txt')['fileid']; - $id2 = $this->sharedCache->get('subdir/another too.txt')['fileid']; - $id3 = $this->sharedCache->get('subdir/not a text file.xml')['fileid']; - $id4 = $this->sharedCache->get('subdir/another.txt')['fileid']; - $tagManager = \OC::$server->getTagManager()->load('files', [], false, $userId); - $tagManager->tagAs($id1, 'tag1'); - $tagManager->tagAs($id1, 'tag2'); - $tagManager->tagAs($id2, 'tag1'); - $tagManager->tagAs($id3, 'tag1'); - $tagManager->tagAs($id4, 'tag2'); - $results = $this->sharedStorage->getCache()->searchByTag('tag1', $userId); - $check = array( - array( - 'name' => 'bar.txt', - 'path' => 'bar.txt' - ), - array( - 'name' => 'another too.txt', - 'path' => 'subdir/another too.txt' - ), - array( - 'name' => 'not a text file.xml', - 'path' => 'subdir/not a text file.xml' - ), - ); - $this->verifyFiles($check, $results); - $tagManager->delete(array('tag1', 'tag2')); - } - - /** - * Test searching by tag for multiple sections of the tree - */ - function testSearchByTagTree() { - $userId = \OC::$server->getUserSession()->getUser()->getUId(); - $this->sharedStorage->mkdir('subdir/emptydir'); - $this->sharedStorage->mkdir('subdir/emptydir2'); - $this->ownerStorage->getScanner()->scan(''); - $allIds = array( - $this->sharedCache->get('')['fileid'], - $this->sharedCache->get('bar.txt')['fileid'], - $this->sharedCache->get('subdir/another too.txt')['fileid'], - $this->sharedCache->get('subdir/not a text file.xml')['fileid'], - $this->sharedCache->get('subdir/another.txt')['fileid'], - $this->sharedCache->get('subdir/emptydir')['fileid'], - $this->sharedCache->get('subdir/emptydir2')['fileid'], - ); - $tagManager = \OC::$server->getTagManager()->load('files', [], false, $userId); - foreach ($allIds as $id) { - $tagManager->tagAs($id, 'tag1'); - } - $results = $this->sharedStorage->getCache()->searchByTag('tag1', $userId); - $check = array( - array( - 'name' => 'shareddir', - 'path' => '' - ), - array( - 'name' => 'bar.txt', - 'path' => 'bar.txt' - ), - array( - 'name' => 'another.txt', - 'path' => 'subdir/another.txt' - ), - array( - 'name' => 'another too.txt', - 'path' => 'subdir/another too.txt' - ), - array( - 'name' => 'emptydir', - 'path' => 'subdir/emptydir' - ), - array( - 'name' => 'emptydir2', - 'path' => 'subdir/emptydir2' - ), - array( - 'name' => 'not a text file.xml', - 'path' => 'subdir/not a text file.xml' - ), - ); - $this->verifyFiles($check, $results); - $tagManager->delete(array('tag1')); - } - function testGetFolderContentsInRoot() { $results = $this->user2View->getDirectoryContent('/'); |