|
@@ 171-180 (lines=10) @@
|
| 168 |
|
* @depends testPrepareContent |
| 169 |
|
* @dataProvider providerForTestFulltextSearch |
| 170 |
|
*/ |
| 171 |
|
public function testFulltextContentSearch($searchString, array $expectedKeys, array $idMap) |
| 172 |
|
{ |
| 173 |
|
$repository = $this->getRepository(false); |
| 174 |
|
$searchService = $repository->getSearchService(); |
| 175 |
|
|
| 176 |
|
$query = new Query(['query' => new Criterion\FullText($searchString)]); |
| 177 |
|
$searchResult = $searchService->findContent($query); |
| 178 |
|
|
| 179 |
|
$this->assertFulltextSearch($searchResult, $expectedKeys, $idMap); |
| 180 |
|
} |
| 181 |
|
|
| 182 |
|
/** |
| 183 |
|
* Test for the findLocations() method. |
|
@@ 192-201 (lines=10) @@
|
| 189 |
|
* @depends testPrepareContent |
| 190 |
|
* @dataProvider providerForTestFulltextSearch |
| 191 |
|
*/ |
| 192 |
|
public function testFulltextLocationSearch($searchString, array $expectedKeys, array $idMap) |
| 193 |
|
{ |
| 194 |
|
$repository = $this->getRepository(false); |
| 195 |
|
$searchService = $repository->getSearchService(); |
| 196 |
|
|
| 197 |
|
$query = new LocationQuery(['query' => new Criterion\FullText($searchString)]); |
| 198 |
|
$searchResult = $searchService->findLocations($query); |
| 199 |
|
|
| 200 |
|
$this->assertFulltextSearch($searchResult, $expectedKeys, $idMap); |
| 201 |
|
} |
| 202 |
|
|
| 203 |
|
/** |
| 204 |
|
* Assert given $searchResult using $expectedKeys and $idMap. |