AjaxTest.php 553 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\CatalogSearch\Controller;
  7. class AjaxTest extends \Magento\TestFramework\TestCase\AbstractController
  8. {
  9. /**
  10. * @magentoDataFixture Magento/CatalogSearch/_files/query.php
  11. */
  12. public function testSuggestAction()
  13. {
  14. $this->getRequest()->setParam('q', 'query_text');
  15. $this->dispatch('catalogsearch/ajax/suggest');
  16. $this->assertContains('query_text', $this->getResponse()->getBody());
  17. }
  18. }