/**
  * Creation customer from backend.
  *
  * @param Customer $customer
  * @param Address $address
  * @return void
  */
 public function test(Customer $customer, Address $address)
 {
     // Prepare data
     $address = $address->hasData() ? $address : null;
     // Steps
     $this->pageCustomerIndex->open();
     $this->pageCustomerIndex->getPageActionsBlock()->addNew();
     $this->pageCustomerIndexNew->getCustomerForm()->fillCustomer($customer, $address);
     $this->pageCustomerIndexNew->getPageActionsBlock()->save();
 }
 /**
  * Assert that customer group find on customer account information page.
  *
  * @param CustomerGroup $customerGroup
  * @param CustomerNew $customerNew
  * @return void
  */
 public function processAssert(CustomerGroup $customerGroup, CustomerNew $customerNew)
 {
     $customerNew->open();
     $formCustomerGroups = $customerNew->getCustomerForm()->getCustomerGroups();
     $customerGroupCode = $customerGroup->getCustomerGroupCode();
     \PHPUnit_Framework_Assert::assertTrue(in_array($customerGroupCode, $formCustomerGroups), "Customer group '{$customerGroupCode}' is absent on customer account information page");
 }