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
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-07-18 16:06:55 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-07-26 13:29:19 +0300
commit0487144b2679f83f9a6b59b55561af062f692836 (patch)
treee2bd28fe000bb4fba8aed4f657ce16dbc2c40621 /apps/files_sharing/tests
parentb2341cdfd02b3e8ad90f8ae41320f708c3d54bb6 (diff)
Remove deprecated searchByTag
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r--apps/files_sharing/tests/CacheTest.php90
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('/');