/** * Test for the findContent() method. * * @param string $type * * @see \eZ\Publish\API\Repository\SearchService::findContent() * @depends eZ\Publish\API\Repository\Tests\RepositoryTest::testGetSearchService */ public function testModifiedFieldRangeQueryAlwaysAvailableEmpty($type = null) { if ($type === null) { $type = "query"; } $content1 = $this->createTestFolderWithName("eng-GB", "z", "eng-US", "e", "eng-US", true); $content2 = $this->createTestFolderWithName("eng-GB", "e", "eng-US", "z", "eng-GB", true); $query = new Query(array($type => $criterion = new Criterion\Field("short_description", Operator::GTE, "z"))); $criterion->setCustomField("folder", "short_description", "folder_name_value_ms"); $repository = $this->getRepository(); $searchService = $repository->getSearchService(); $fieldFilters = array("languages" => array("ger-DE"), "useAlwaysAvailable" => true); $searchResult = $searchService->findContent($query, $fieldFilters); $this->assertEquals(0, $searchResult->totalCount); }
/** * Test for the findContent() method. * * @param string $type * * @see \eZ\Publish\API\Repository\SearchService::findContent() */ public function testModifiedFieldRangeQueryAlwaysAvailableEmpty($type = null) { $this->checkCustomFieldsSupport(); if ($type === null) { $type = 'query'; } $content1 = $this->createTestFolderWithName('eng-GB', 'z', 'eng-US', 'e', 'eng-US', true); $content2 = $this->createTestFolderWithName('eng-GB', 'e', 'eng-US', 'z', 'eng-GB', true); $query = new Query(array($type => $criterion = new Criterion\Field('short_description', Operator::GTE, 'z'))); $criterion->setCustomField('folder', 'short_description', 'folder_name_value_s'); $repository = $this->getRepository(); $searchService = $repository->getSearchService(); $fieldFilters = array('languages' => array('ger-DE')); $searchResult = $searchService->findContent($query, $fieldFilters); $this->assertEquals(0, $searchResult->totalCount); }