This commit is contained in:
Qiang Xue 2014-02-06 20:39:55 -05:00
parent 5f6a9d4a66
commit 042ba3f435

View File

@ -14,7 +14,7 @@ class ContactPage extends BasePage
public function submit(array $contactData) public function submit(array $contactData)
{ {
foreach ($contactData as $field => $value) { foreach ($contactData as $field => $value) {
$inputType = ($field == 'body') ? 'textarea' : 'input'; $inputType = $field === 'body' ? 'textarea' : 'input';
$this->guy->fillField($inputType . '[name="ContactForm[' . $field . ']"]', $value); $this->guy->fillField($inputType . '[name="ContactForm[' . $field . ']"]', $value);
} }
$this->guy->click('Submit', '#contact-form'); $this->guy->click('Submit', '#contact-form');