Skip to content

Commit ca3b257

Browse files
MTO-136: [Test] Captcha on Contact Us form
- Add telephone number to fixture if it is defined.
1 parent 568203b commit ca3b257

File tree

1 file changed

+4
-1
lines changed
  • dev/tests/functional/tests/app/Magento/Contact/Test/Fixture/Comment

1 file changed

+4
-1
lines changed

dev/tests/functional/tests/app/Magento/Contact/Test/Fixture/Comment/Customer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ public function getData($key = null)
6969
$this->data = [
7070
'firstname' => $customer->getFirstname(),
7171
'email' => $customer->getEmail(),
72-
'telephone' => $customer->hasData('telephone') ? $customer->getData('telephone') : ''
7372
];
73+
74+
if ($customer->hasData('telephone')) {
75+
$this->data['telephone'] = $customer->getData('telephone');
76+
}
7477
}
7578

7679
return parent::getData($key);

0 commit comments

Comments
 (0)