diff options
author | Robin Appelman <robin@icewind.nl> | 2018-01-16 13:22:28 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-01-16 13:27:52 +0100 |
commit | 3a1390fdb7fec732b7d69706e3221d956ce18609 (patch) | |
tree | 7ae1dcdebe4fbdcd97dbcceca40a676475efb613 /tests | |
parent | c25da25180bd446c0068a0155a5a386ac05d2d51 (diff) | |
download | nextcloud-server-3a1390fdb7fec732b7d69706e3221d956ce18609.tar.gz nextcloud-server-3a1390fdb7fec732b7d69706e3221d956ce18609.zip |
Support arbitrary number of arguments for d:or and d:and in search queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/Cache/QuerySearchHelperTest.php | 7 |
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), |