Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
RegisterCustomerFrontendEntityTest.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Test\Page\CustomerAccountCreate;
11 use Magento\Cms\Test\Page\CmsIndex;
13 use Magento\Mtf\TestCase\Injectable;
14 
26 class RegisterCustomerFrontendEntityTest extends Injectable
27 {
28  /* tags */
29  const MVP = 'yes';
30  const TEST_TYPE = 'acceptance_test, extended_acceptance_test';
31  /* end tags */
32 
39 
45  protected $cmsIndex;
46 
53 
61  public function __inject(
62  CustomerAccountCreate $customerAccountCreate,
63  CmsIndex $cmsIndex,
65  ) {
66  $this->customerAccountCreate = $customerAccountCreate;
67  $this->cmsIndex = $cmsIndex;
68  $this->logoutCustomerOnFrontendStep = $logoutCustomerOnFrontendStep;
69  }
70 
77  public function test(Customer $customer)
78  {
79  $this->logoutCustomerOnFrontendStep->run();
80  // Steps
81  $this->cmsIndex->open();
82  $this->cmsIndex->getLinksBlock()->openCustomerCreateLink();
83  $this->customerAccountCreate->getRegisterForm()->registerCustomer($customer);
84  }
85 
91  public function tearDown()
92  {
93  $this->logoutCustomerOnFrontendStep->run();
94  }
95 }
$customer
Definition: customers.php:11
__inject(CustomerAccountCreate $customerAccountCreate, CmsIndex $cmsIndex, LogoutCustomerOnFrontendStep $logoutCustomerOnFrontendStep)