Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerEmailChanged.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Test\Page\CustomerAccountIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 use Magento\Mtf\Fixture\FixtureFactory;
13 
17 class AssertCustomerEmailChanged extends AbstractConstraint
18 {
28  public function processAssert(
29  FixtureFactory $fixtureFactory,
30  CustomerAccountIndex $customerAccountIndex,
31  Customer $initialCustomer,
32  Customer $customer
33  ) {
34  $customer = $fixtureFactory->createByCode(
35  'customer',
36  [
37  'data' => [
38  'email' => $customer->getEmail(),
39  'password' => $initialCustomer->getPassword()
40  ],
41  ]
42  );
43 
44  $this->objectManager->create(
45  \Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
46  ['customer' => $customer]
47  )->run();
48 
49  \PHPUnit\Framework\Assert::assertTrue(
50  $customerAccountIndex->getAccountMenuBlock()->isVisible(),
51  'Customer Account Dashboard is not visible.'
52  );
53  }
54 
60  public function toString()
61  {
62  return 'Customer email was changed.';
63  }
64 }
$customer
Definition: customers.php:11
processAssert(FixtureFactory $fixtureFactory, CustomerAccountIndex $customerAccountIndex, Customer $initialCustomer, Customer $customer)