$value) { $inputType = $field === 'body' ? 'textarea' : 'input'; $this->guy->fillField($inputType . '[name="ContactForm[' . $field . ']"]', $value); } $this->guy->click('Submit', '#contact-form'); } }