File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
dev/tests/integration/testsuite/Magento/CatalogSearch/Block Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -94,8 +94,8 @@ protected function _loadTerms()
94
94
continue ;
95
95
}
96
96
$ term ->setRatio (($ term ->getPopularity () - $ this ->_minPopularity ) / $ range );
97
- $ temp [$ term ->getName ()] = $ term ;
98
- $ termKeys [] = $ term ->getName ();
97
+ $ temp [$ term ->getQueryText ()] = $ term ;
98
+ $ termKeys [] = $ term ->getQueryText ();
99
99
}
100
100
natcasesort ($ termKeys );
101
101
@@ -127,7 +127,7 @@ public function getSearchUrl($obj)
127
127
* url encoding will be done in Url.php http_build_query
128
128
* so no need to explicitly called urlencode for the text
129
129
*/
130
- $ url ->setQueryParam ('q ' , $ obj ->getName ());
130
+ $ url ->setQueryParam ('q ' , $ obj ->getQueryText ());
131
131
return $ url ->getUrl ('catalogsearch/result ' );
132
132
}
133
133
Original file line number Diff line number Diff line change 13
13
<li class="item">
14
14
<a href="<?= /* @escapeNotVerified */ $ block ->getSearchUrl ($ _term ) ?> "
15
15
style="font-size:<?= /* @escapeNotVerified */ $ _term ->getRatio ()*70 +75 ?> %;">
16
- <?= $ block ->escapeHtml ($ _term ->getName ()) ?>
16
+ <?= $ block ->escapeHtml ($ _term ->getQueryText ()) ?>
17
17
</a>
18
18
</li>
19
19
<?php endforeach ; ?>
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ protected function setUp()
24
24
public function testGetSearchUrl ()
25
25
{
26
26
$ query = uniqid ();
27
- $ obj = new \Magento \Framework \DataObject (['name ' => $ query ]);
27
+ $ obj = new \Magento \Framework \DataObject (['query_text ' => $ query ]);
28
28
$ this ->assertStringEndsWith ("/catalogsearch/result/?q= {$ query }" , $ this ->_block ->getSearchUrl ($ obj ));
29
29
}
30
30
}
You can’t perform that action at this time.
0 commit comments