Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerIsLockedOnBackend.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertCustomerIsLockedOnBackend extends AbstractConstraint
17 {
21  const CUSTOMER_LOCKED_ACCOUNT = 'Locked';
22 
30  public function processAssert(
31  CustomerIndexEdit $customerIndexEdit,
32  Customer $customer
33  ) {
34  $customerIndexEdit->open(['id' => $customer->getId()]);
35  \PHPUnit\Framework\Assert::assertEquals(
36  self::CUSTOMER_LOCKED_ACCOUNT,
37  $customerIndexEdit->getCustomerForm()->getPersonalInformation('Account Lock'),
38  'Incorrect customer account status.'
39  );
40  }
41 
47  public function toString()
48  {
49  return 'Customer account status is correct.';
50  }
51 }
processAssert(CustomerIndexEdit $customerIndexEdit, Customer $customer)
$customer
Definition: customers.php:11