|
@@ 560-577 (lines=18) @@
|
| 557 |
|
* |
| 558 |
|
* @depends testFindContentInfoFullTextIsSearchable |
| 559 |
|
*/ |
| 560 |
|
public function testFindContentInfoFullTextIsNotSearchable() |
| 561 |
|
{ |
| 562 |
|
$searchTerm = 'pamplemousse'; |
| 563 |
|
$this->createFullTextIsSearchableContent($searchTerm, false); |
| 564 |
|
|
| 565 |
|
$repository = $this->getRepository(); |
| 566 |
|
$searchService = $repository->getSearchService(); |
| 567 |
|
|
| 568 |
|
$query = new Query( |
| 569 |
|
[ |
| 570 |
|
'query' => new Criterion\FullText($searchTerm), |
| 571 |
|
] |
| 572 |
|
); |
| 573 |
|
|
| 574 |
|
$searchResult = $searchService->findContentInfo($query); |
| 575 |
|
|
| 576 |
|
$this->assertEquals(0, $searchResult->totalCount); |
| 577 |
|
} |
| 578 |
|
|
| 579 |
|
/** |
| 580 |
|
* Test that indexing full text data depends on the isSearchable flag on the field definition. |
|
@@ 584-600 (lines=17) @@
|
| 581 |
|
* |
| 582 |
|
* @depends testFindLocationsFullTextIsSearchable |
| 583 |
|
*/ |
| 584 |
|
public function testFindLocationsFullTextIsNotSearchable() |
| 585 |
|
{ |
| 586 |
|
$searchTerm = 'pamplemousse'; |
| 587 |
|
|
| 588 |
|
$repository = $this->getRepository(false); |
| 589 |
|
$searchService = $repository->getSearchService(); |
| 590 |
|
|
| 591 |
|
$query = new LocationQuery( |
| 592 |
|
[ |
| 593 |
|
'query' => new Criterion\FullText($searchTerm), |
| 594 |
|
] |
| 595 |
|
); |
| 596 |
|
|
| 597 |
|
$searchResult = $searchService->findLocations($query); |
| 598 |
|
|
| 599 |
|
$this->assertEquals(0, $searchResult->totalCount); |
| 600 |
|
} |
| 601 |
|
|
| 602 |
|
/** |
| 603 |
|
* Creates Content for testing full text search depending on the isSearchable flag. |