Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertStoreCodeInUrl.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;
12 
16 class AssertStoreCodeInUrl extends AbstractConstraint
17 {
26  public function processAssert(CmsIndex $cmsIndex, BrowserInterface $browser, $storeCode)
27  {
28  $cmsIndex->open();
29  $cmsIndex->getLogoBlock()->clickOnLogo();
30  \PHPUnit\Framework\Assert::assertEquals(
31  $_ENV['app_frontend_url'] . $storeCode . '/',
32  $browser->getUrl(),
33  sprintf('Store code \'%s\' is not present in the url: %s', $storeCode, $browser->getUrl())
34  );
35  }
36 
42  public function toString()
43  {
44  return 'Store code is present in the url.';
45  }
46 }
processAssert(CmsIndex $cmsIndex, BrowserInterface $browser, $storeCode)
$storeCode
Definition: indexer.php:15