/**
  * Assert that product available by new URL on the frontend.
  *
  * @param Browser $browser
  * @param UrlRewrite $urlRewrite
  * @param CatalogProductSimple $product
  * @param CatalogProductView $catalogProductView
  * @param CmsIndex $cmsIndex
  * @param Cache $cachePage
  * @return void
  */
 public function processAssert(Browser $browser, UrlRewrite $urlRewrite, CatalogProductSimple $product, CatalogProductView $catalogProductView, CmsIndex $cmsIndex, Cache $cachePage)
 {
     $cachePage->open()->getPageActions()->flushCacheStorage();
     if ($urlRewrite->hasData('store_id')) {
         $storePath = explode('/', $urlRewrite->getStoreId());
         $cmsIndex->open();
         $cmsIndex->getHeaderBlock()->selectStore($storePath[2]);
     }
     $browser->open($_ENV['app_frontend_url'] . $urlRewrite->getRequestPath());
     \PHPUnit_Framework_Assert::assertEquals($catalogProductView->getViewBlock()->getProductName(), strtoupper($product->getName()), 'URL rewrite product redirect false.');
 }
 /**
  * Assert that url rewrite not in grid.
  *
  * @param UrlRewriteIndex $urlRewriteIndex
  * @param UrlRewrite $urlRewrite
  * @return void
  */
 public function processAssert(UrlRewriteIndex $urlRewriteIndex, UrlRewrite $urlRewrite)
 {
     $urlRewriteIndex->open();
     $filter = ['request_path' => $urlRewrite->getIdentifier()];
     \PHPUnit_Framework_Assert::assertFalse($urlRewriteIndex->getUrlRedirectGrid()->isRowVisible($filter), "URL Rewrite with request path {$urlRewrite->getRequestPath()} is present in grid.");
 }