Skip to content

Commit

Permalink
code fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragazzo committed Feb 7, 2014
1 parent bf5bb37 commit cf1fe7d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions apps/basic/tests/_pages/ContactPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ class ContactPage extends BasePage
public function submit(array $contactData)
{
foreach ($contactData as $field => $value) {
if (in_array($field, ['name','email','subject','verifyCode'])) {
$this->guy->fillField('input[name="ContactForm[' . $field .']"]', $value);
if ($field == 'body') {
$this->guy->fillField('textarea[name="ContactForm[' . $field . ']"]', $value);
} else {
$this->guy->fillField('input[name="ContactForm[' . $field .']"]', $value);
}
}

if (isset($contactData['body'])) {
$this->guy->fillField('textarea[name="ContactForm[body]"]',$contactData['body']);
}
$this->guy->click('Submit','#contact-form');
}
}

0 comments on commit cf1fe7d

Please sign in to comment.