Skip to content

Commit c67166f

Browse files
MC-35491: Patch Request : Re: Slow query on search_query
1 parent de9318d commit c67166f

File tree

1 file changed

+8
-0
lines changed
  • dev/tests/integration/testsuite/Magento/CatalogSearch/Block

1 file changed

+8
-0
lines changed

dev/tests/integration/testsuite/Magento/CatalogSearch/Block/ResultTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Framework\View\LayoutInterface;
1313
use Magento\Search\Model\QueryFactory;
1414
use Magento\TestFramework\Helper\Bootstrap;
15+
use Magento\Search\ViewModel\ConfigProvider;
1516

1617
class ResultTest extends \PHPUnit\Framework\TestCase
1718
{
@@ -25,13 +26,19 @@ class ResultTest extends \PHPUnit\Framework\TestCase
2526
*/
2627
private $layout;
2728

29+
/**
30+
* @var ConfigProvider
31+
*/
32+
private $configProvider;
33+
2834
/**
2935
* @inheritdoc
3036
*/
3137
protected function setUp(): void
3238
{
3339
$this->objectManager = Bootstrap::getObjectManager();
3440
$this->layout = $this->objectManager->get(LayoutInterface::class);
41+
$this->configProvider = $this->objectManager->get(ConfigProvider::class);
3542
}
3643

3744
public function testSetListOrders()
@@ -62,6 +69,7 @@ public function testEscapeSearchText(string $searchValue, string $expectedOutput
6269
$searchResultBlock = $this->layout->createBlock(Result::class);
6370
/** @var Template $searchBlock */
6471
$searchBlock = $this->layout->createBlock(Template::class);
72+
$searchBlock->setData(['configProvider' => $this->configProvider]);
6573
$searchBlock->setTemplate('Magento_Search::form.mini.phtml');
6674
/** @var RequestInterface $request */
6775
$request = $this->objectManager->get(RequestInterface::class);

0 commit comments

Comments
 (0)