From 709f64d39699331f197dd2d93b9d62980a2ba145 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 21 Feb 2017 18:18:41 +0100 Subject: add tests for filesearchbackend Signed-off-by: Robin Appelman --- apps/dav/lib/Files/FileSearchBackend.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'apps/dav/lib/Files') diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php index 3d87612aad7..c429a1727f8 100644 --- a/apps/dav/lib/Files/FileSearchBackend.php +++ b/apps/dav/lib/Files/FileSearchBackend.php @@ -130,6 +130,10 @@ class FileSearchBackend implements ISearchBackend { ]; } + /** + * @param BasicSearch $search + * @return SearchResult[] + */ public function search(BasicSearch $search) { if (count($search->from) !== 1) { throw new \InvalidArgumentException('Searching more than one folder is not supported'); @@ -225,13 +229,6 @@ class FileSearchBackend implements ISearchBackend { * @return string */ private function mapPropertyNameToCollumn($propertyName) { - /** - * new SearchPropertyDefinition('{DAV:}displayname', true, false, true), - * new SearchPropertyDefinition('{DAV:}getcontenttype', true, true, true), - * new SearchPropertyDefinition('{DAV:}getlastmodifed', true, true, true, SearchPropertyDefinition::DATATYPE_DATETIME), - * new SearchPropertyDefinition(FilesPlugin::SIZE_PROPERTYNAME, true, true, true, SearchPropertyDefinition::DATATYPE_NONNEGATIVE_INTEGER), - */ - switch ($propertyName) { case '{DAV:}displayname': return 'name'; -- cgit v1.2.3