mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Инициализировано Yii2 приложение, выпилены лишние части, накинуты чуточку нужных
This commit is contained in:
27
tests/codeception/api/_pages/SignupPage.php
Normal file
27
tests/codeception/api/_pages/SignupPage.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace tests\codeception\api\_pages;
|
||||
|
||||
use \yii\codeception\BasePage;
|
||||
|
||||
/**
|
||||
* Represents signup page
|
||||
* @property \codeception_api\AcceptanceTester|\codeception_api\FunctionalTester $actor
|
||||
*/
|
||||
class SignupPage extends BasePage
|
||||
{
|
||||
|
||||
public $route = 'site/signup';
|
||||
|
||||
/**
|
||||
* @param array $signupData
|
||||
*/
|
||||
public function submit(array $signupData)
|
||||
{
|
||||
foreach ($signupData as $field => $value) {
|
||||
$inputType = $field === 'body' ? 'textarea' : 'input';
|
||||
$this->actor->fillField($inputType . '[name="SignupForm[' . $field . ']"]', $value);
|
||||
}
|
||||
$this->actor->click('signup-button');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user