public function testGetSearchQueryText()
 {
     $this->dataMock->expects($this->once())->method('getEscapedQueryText')->will($this->returnValue('query_text'));
     $this->assertEquals('Search results for: \'query_text\'', $this->model->getSearchQueryText());
 }
Beispiel #2
0
 /**
  * @return \Magento\Framework\Phrase|string
  */
 public function getSearchQueryText()
 {
     if ($this->fallback) {
         return parent::getSearchQueryText();
     }
     if ($this->bxHelperData->isSearchEnabled() && $this->p13nHelper->areResultsCorrected()) {
         $correctedQuery = $this->p13nHelper->getCorrectedQuery();
         return __("Corrected search results for: '%1'", $correctedQuery);
     } else {
         if ($this->hasSubPhrases()) {
             return "";
         } else {
             return parent::getSearchQueryText();
         }
     }
 }