Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCatalogSearchNoResult.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Constraint\AbstractConstraint;
10 use Magento\CatalogSearch\Test\Page\CatalogsearchResult;
11 
15 class AssertCatalogSearchNoResult extends AbstractConstraint
16 {
23  public function processAssert(CatalogsearchResult $catalogsearchResult)
24  {
25  \PHPUnit\Framework\Assert::assertFalse(
26  $catalogsearchResult->getListProductBlock()->isVisible(),
27  'Search result has been found.'
28  );
29  }
30 
36  public function toString()
37  {
38  return 'Search result has not been found.';
39  }
40 }