Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
Register Class Reference
Inheritance diagram for Register:
Register

Public Member Functions

 registerCustomer (FixtureInterface $fixture, $address=null)
 
 getPasswordError ()
 
 getPasswordConfirmationError ()
 

Protected Member Functions

 dataMapping (array $fields=null, $parent=null)
 

Protected Attributes

 $submit = '.action.submit'
 
 $customerAttribute = "[name='%s']"
 
 $passwordError = "#password-error"
 
 $passwordConfirmationError = "#password-confirmation-error"
 

Detailed Description

Class Register Register new customer on Frontend

Definition at line 17 of file Register.php.

Member Function Documentation

◆ dataMapping()

dataMapping ( array  $fields = null,
  $parent = null 
)
protected

Fixture mapping.

Parameters
array | null$fields
string | null$parent
Returns
array

Definition at line 54 of file Register.php.

55  {
56  if (isset($fields['website_id'])) {
57  unset($fields['website_id']);
58  }
59  return parent::dataMapping($fields, $parent);
60  }
$fields
Definition: details.phtml:14

◆ getPasswordConfirmationError()

getPasswordConfirmationError ( )

Get password confirmation error on new customer registration form.

Returns
string

Definition at line 94 of file Register.php.

95  {
96  return $this->_rootElement->find($this->passwordConfirmationError, Locator::SELECTOR_CSS)->getText();
97  }

◆ getPasswordError()

getPasswordError ( )

Get password error on new customer registration form.

Returns
string

Definition at line 83 of file Register.php.

84  {
85  return $this->_rootElement->find($this->passwordError, Locator::SELECTOR_CSS)->getText();
86  }

◆ registerCustomer()

registerCustomer ( FixtureInterface  $fixture,
  $address = null 
)

Create new customer account and fill billing address if it exists

Parameters
FixtureInterface$fixture
$address

Definition at line 68 of file Register.php.

69  {
70  $this->fill($fixture);
71  if ($address !== null) {
72  $this->fill($address);
73  }
74  $this->_rootElement->find($this->submit, Locator::SELECTOR_CSS)->click();
75  }
$address
Definition: customer.php:38

Field Documentation

◆ $customerAttribute

$customerAttribute = "[name='%s']"
protected

Definition at line 31 of file Register.php.

◆ $passwordConfirmationError

$passwordConfirmationError = "#password-confirmation-error"
protected

Definition at line 45 of file Register.php.

◆ $passwordError

$passwordError = "#password-error"
protected

Definition at line 38 of file Register.php.

◆ $submit

$submit = '.action.submit'
protected

Definition at line 24 of file Register.php.


The documentation for this class was generated from the following file: