Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertChangingWebsiteChangeCountries.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Test\Page\Adminhtml\CustomerIndexNew;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertChangingWebsiteChangeCountries extends AbstractConstraint
17 {
25  public function processAssert(
26  CustomerIndexNew $customerIndexNew,
27  Customer $customer,
28  $expectedList
29  ) {
30  $customerIndexNew->getCustomerForm()
31  ->openTab('account_information');
32  $customerIndexNew->getCustomerForm()->fillCustomer($customer);
33  $customerIndexNew->getCustomerForm()
34  ->openTab('addresses');
35  $tab = $customerIndexNew->getCustomerForm()
36  ->getTab('addresses');
37  $countriesList = $tab->getCountriesList(1);
38  sort($countriesList);
39  sort($expectedList);
40  \PHPUnit\Framework\Assert::assertEquals(
41  $countriesList,
42  $expectedList,
43  'Wrong country list is displayed.'
44  );
45  }
46 
52  public function toString()
53  {
54  return 'All required fields on customer form are highlighted.';
55  }
56 }
processAssert(CustomerIndexNew $customerIndexNew, Customer $customer, $expectedList)
$customer
Definition: customers.php:11