@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | public function testQueryInSearchBoxForOneFormOnly() { |
| 244 | 244 | $searchPageObj = $this->ElasticSearchPage2; |
| 245 | 245 | $url = rtrim($searchPageObj->Link(), '/'); |
| 246 | - $url .= "?q=Auckland&sfid=".$searchPageObj->Identifier; |
|
| 246 | + $url .= "?q=Auckland&sfid=" . $searchPageObj->Identifier; |
|
| 247 | 247 | $response = $this->get($url); |
| 248 | 248 | $this->assertEquals(200, $response->getStatusCode()); |
| 249 | 249 | $this->assertAttributeHasExactValue('#ElasticSearchForm_SearchForm_q', 'q', |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | $ctr = 0; |
| 379 | 379 | |
| 380 | 380 | // results vary slightly due to sharding, hence check for a string instead of absolute results |
| 381 | - while ($ctr < 18) { |
|
| 381 | + while($ctr < 18) { |
|
| 382 | 382 | $this->assertSelectorContains('div.searchResult a', $ctr, 'New Orleans, Southern Pacific'); |
| 383 | 383 | $ctr++; |
| 384 | 384 | $this->assertSelectorStartsWithOrEquals('div.searchResult a', $ctr, 'Similar'); |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | $this->assertEquals(200, $response->getStatusCode()); |
| 414 | 414 | |
| 415 | 415 | // results vary slightly due to sharding, hence check for a string instead of absolute results |
| 416 | - while ($ctr < 18) { |
|
| 416 | + while($ctr < 18) { |
|
| 417 | 417 | $this->assertSelectorContains('div.searchResult a', $ctr, 'New', true); |
| 418 | 418 | $ctr++; |
| 419 | 419 | $this->assertSelectorStartsWithOrEquals('div.searchResult a', $ctr, 'Similar'); |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | //Note pages need to be published, by default fixtures only reside in Stage |
| 451 | 451 | $searchPageObj = $this->ElasticSearchPage2; |
| 452 | 452 | $url = rtrim($searchPageObj->Link(), '/'); |
| 453 | - $url = $url.'?q='.$searchTerm; |
|
| 453 | + $url = $url . '?q=' . $searchTerm; |
|
| 454 | 454 | $response = $this->get($url); |
| 455 | 455 | $this->assertEquals(200, $response->getStatusCode()); |
| 456 | 456 | |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | //Note pages need to be published, by default fixtures only reside in Stage |
| 518 | 518 | $searchPageObj = $this->ElasticSearchPage; |
| 519 | 519 | $url = rtrim($searchPageObj->Link(), '/'); |
| 520 | - $url = $url.'?q='.$searchTerm; |
|
| 520 | + $url = $url . '?q=' . $searchTerm; |
|
| 521 | 521 | $response = $this->get($url); |
| 522 | 522 | $this->assertEquals(200, $response->getStatusCode()); |
| 523 | 523 | |
@@ -648,18 +648,18 @@ discard block |
||
| 648 | 648 | //increase the number of results and assert that they are the same as per pages 1,2 joined |
| 649 | 649 | $searchPageObj->ResultsPerPage = 20; |
| 650 | 650 | $searchPageObj->write(); |
| 651 | - $searchPageObj->publish('Stage','Live'); |
|
| 651 | + $searchPageObj->publish('Stage', 'Live'); |
|
| 652 | 652 | $response3 = $this->get($firstPageURL); |
| 653 | 653 | } |
| 654 | 654 | |
| 655 | 655 | |
| 656 | 656 | private function enableHighlights() { |
| 657 | - foreach (SearchableField::get()->filter('Name', 'Title') as $sf) { |
|
| 657 | + foreach(SearchableField::get()->filter('Name', 'Title') as $sf) { |
|
| 658 | 658 | $sf->ShowHighlights = true; |
| 659 | 659 | $sf->write(); |
| 660 | 660 | } |
| 661 | 661 | |
| 662 | - foreach (SearchableField::get()->filter('Name', 'Content') as $sf) { |
|
| 662 | + foreach(SearchableField::get()->filter('Name', 'Content') as $sf) { |
|
| 663 | 663 | $sf->ShowHighlights = true; |
| 664 | 664 | $sf->write(); |
| 665 | 665 | } |