ContactPage.php 381 B

12345678910111213141516171819202122
  1. <?php
  2. namespace tests\_pages;
  3. use yii\codeception\BasePage;
  4. class ContactPage extends BasePage
  5. {
  6. public $route = 'site/contact';
  7. /**
  8. * @param array $contactData
  9. */
  10. public function submit(array $contactData)
  11. {
  12. $data = [];
  13. foreach ($contactData as $name => $value) {
  14. $data["ContactForm[$name]"] = $value;
  15. }
  16. $this->guy->submitForm('#contact-form', $data);
  17. }
  18. }