Первичная реализация формы отправки нового письма с активацией аккаунта, чуть-чуть рефакторинга тестов

This commit is contained in:
ErickSkrauch
2016-03-13 02:19:00 +03:00
parent 7e2247ccb5
commit b9ee667829
11 changed files with 227 additions and 81 deletions

View File

@ -0,0 +1,28 @@
<?php
namespace tests\codeception\api\_pages;
use yii\codeception\BasePage;
/**
* @property \tests\codeception\api\FunctionalTester $actor
*/
class SignupRoute extends BasePage {
public function register(array $registrationData) {
$this->route = ['signup/index'];
$this->actor->sendPOST($this->getUrl(), $registrationData);
}
public function sendNewMessage($email = '') {
$this->route = ['signup/new-message'];
$this->actor->sendPOST($this->getUrl(), ['email' => $email]);
}
public function confirm($key = '') {
$this->route = ['signup/confirm'];
$this->actor->sendPOST($this->getUrl(), [
'key' => $key,
]);
}
}