summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-01-16 19:53:01 +0100
committerGitHub <noreply@github.com>2018-01-16 19:53:01 +0100
commit2b70c708abc667c3e3c4fd9a97626012bf1ded25 (patch)
tree57df2fc83daefe1c9a0dbd31f51f615322e99854 /tests
parenta159d7c28c483a2b77e2f533795f6d6d1ec720fd (diff)
parent326d55db816ffa699f5374fc4b0a75b88f6edbd1 (diff)
downloadnextcloud-server-2b70c708abc667c3e3c4fd9a97626012bf1ded25.tar.gz
nextcloud-server-2b70c708abc667c3e3c4fd9a97626012bf1ded25.zip
Merge pull request #7882 from nextcloud/search-and
Support arbitrary number of arguments for d:or and d:and in search queries
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/Cache/QuerySearchHelperTest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lib/Files/Cache/QuerySearchHelperTest.php b/tests/lib/Files/Cache/QuerySearchHelperTest.php
index 850cee066a1..addeac71350 100644
--- a/tests/lib/Files/Cache/QuerySearchHelperTest.php
+++ b/tests/lib/Files/Cache/QuerySearchHelperTest.php
@@ -151,8 +151,13 @@ class QuerySearchHelperTest extends TestCase {
[new SearchComparison(ISearchComparison::COMPARE_LIKE, 'mimetype', 'image/%'), [0, 1]],
[new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_AND, [
new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'size', 50),
- new SearchComparison(ISearchComparison::COMPARE_LESS_THAN, 'mtime', 125), [0]
+ new SearchComparison(ISearchComparison::COMPARE_LESS_THAN, 'mtime', 125)
]), [0]],
+ [new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_AND, [
+ new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'size', 50),
+ new SearchComparison(ISearchComparison::COMPARE_LESS_THAN, 'mtime', 125),
+ new SearchComparison(ISearchComparison::COMPARE_LIKE, 'mimetype', 'text/%')
+ ]), []],
[new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_OR, [
new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'mtime', 100),
new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'mtime', 150),