diff --git a/tests/bundle/Functional/SearchView/Criterion/ContentNameTest.php b/tests/bundle/Functional/SearchView/Criterion/ContentNameTest.php new file mode 100644 index 00000000..18b2491d --- /dev/null +++ b/tests/bundle/Functional/SearchView/Criterion/ContentNameTest.php @@ -0,0 +1,47 @@ +createFolder('foo', '/api/ibexa/v2/content/locations/1/2'); + $this->createFolder('foobar', '/api/ibexa/v2/content/locations/1/2'); + } + + /** + * @return iterable + */ + public function getCriteriaPayloads(): iterable + { + yield 'Return content items that contain "foo" in name' => [ + 'json', + $this->buildJsonCriterionQuery('"ContentNameCriterion": "foo*"'), + 2, + ]; + + yield 'No content items found with article in name' => [ + 'json', + $this->buildJsonCriterionQuery('"ContentNameCriterion": "*article*"'), + 0, + ]; + } +}