ContactPage.php 381 Bytes
Newer Older
Mark committed
1 2 3 4
<?php

namespace tests\_pages;

5
use yii\codeception\BasePage;
Mark committed
6

7 8
class ContactPage extends BasePage
{
9
	public $route = 'site/contact';
Mark committed
10 11 12 13 14 15

	/**
	 * @param array $contactData
	 */
	public function submit(array $contactData)
	{
Qiang Xue committed
16 17 18
		$data = [];
		foreach ($contactData as $name => $value) {
			$data["ContactForm[$name]"] = $value;
Mark committed
19
		}
Qiang Xue committed
20
		$this->guy->submitForm('#contact-form', $data);
Mark committed
21 22
	}
}