Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerRedirectToDashboard.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Customer\Test\Page\CustomerAccountIndex;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertCustomerRedirectToDashboard extends AbstractConstraint
16 {
20  const DASHBOARD_MESSAGE = 'My Account';
21 
27  protected $severeness = 'low';
28 
35  public function processAssert(CustomerAccountIndex $accountIndexPage)
36  {
37  \PHPUnit\Framework\Assert::assertEquals(
38  self::DASHBOARD_MESSAGE,
39  $accountIndexPage->getTitleBlock()->getTitle(),
40  'Wrong dashboard title is displayed.'
41  );
42  }
43 
49  public function toString()
50  {
51  return 'Customer is redirected to Dashboard after registration.';
52  }
53 }