/** * Run create existing customer account on frontend test. * * @param Customer $customer * @return void */ public function test(Customer $customer) { //Steps $this->cmsIndex->open(); $this->cmsIndex->getTopLinksBlock()->openAccount(); $this->cmsIndex->getLinksBlock()->openLink('Register'); $this->customerAccountCreate->getRegisterForm()->registerCustomer($customer); }
/** * Assert that success message is displayed after customer registered on frontend. * * @param CustomerAccountCreate $registerPage * @return void */ public function processAssert(CustomerAccountCreate $registerPage) { \PHPUnit_Framework_Assert::assertEquals(self::SUCCESS_MESSAGE, $registerPage->getMessagesBlock()->getSuccessMessages(), 'Wrong success message is displayed.'); }
/** * Assert that error message is displayed after creation existing customer. * * @param CustomerAccountCreate $registerPage * @return void */ public function processAssert(CustomerAccountCreate $registerPage) { \PHPUnit_Framework_Assert::assertContains(self::FAIL_MESSAGE, $registerPage->getMessagesBlock()->getErrorMessages(), "Actual error message doesn't match expected error message."); }