Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertRewritesEnabled.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Cms\Test\Page\CmsIndex;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 use Magento\Mtf\Client\BrowserInterface;
13 
17 class AssertRewritesEnabled extends AbstractConstraint
18 {
26  public function processAssert(Category $category, CmsIndex $homePage, BrowserInterface $browser)
27  {
28  $category->persist();
29  $homePage->open();
30  $homePage->getTopmenu()->selectCategoryByName($category->getName());
31 
32  \PHPUnit\Framework\Assert::assertTrue(
33  strpos($browser->getUrl(), 'index.php') === false,
34  'Apache redirect for category does not work.'
35  );
36  }
37 
43  public function toString()
44  {
45  return 'Apache redirect works correct.';
46  }
47 }
processAssert(Category $category, CmsIndex $homePage, BrowserInterface $browser)