yii2-netdisk/tests/_pages/ContactPage.php

23 lines
518 B
PHP
Raw Normal View History

2013-12-02 15:25:21 +04:00
<?php
namespace tests\_pages;
use yii\codeception\BasePage;
2013-12-02 15:25:21 +04:00
class ContactPage extends BasePage
{
2014-03-16 10:46:16 +06:00
public $route = 'site/contact';
2013-12-02 15:25:21 +04:00
2014-03-16 10:46:16 +06:00
/**
* @param array $contactData
*/
public function submit(array $contactData)
{
foreach ($contactData as $field => $value) {
$inputType = $field === 'body' ? 'textarea' : 'input';
$this->guy->fillField($inputType . '[name="ContactForm[' . $field . ']"]', $value);
}
$this->guy->click('contact-button');
}
2013-12-02 15:25:21 +04:00
}