2016-05-11 01:10:06 +05:30
|
|
|
<?php
|
|
|
|
namespace codeception\common\unit\models;
|
|
|
|
|
2016-10-29 05:53:29 +05:30
|
|
|
use common\models\confirmations;
|
2016-05-11 01:10:06 +05:30
|
|
|
use common\models\EmailActivation;
|
|
|
|
use tests\codeception\common\fixtures\EmailActivationFixture;
|
2016-10-29 05:53:29 +05:30
|
|
|
use tests\codeception\common\unit\TestCase;
|
2016-05-11 01:10:06 +05:30
|
|
|
|
2016-10-29 05:53:29 +05:30
|
|
|
class EmailActivationTest extends TestCase {
|
2016-05-11 01:10:06 +05:30
|
|
|
|
2016-10-29 05:53:29 +05:30
|
|
|
public function _fixtures() {
|
2016-05-11 01:10:06 +05:30
|
|
|
return [
|
2016-05-16 04:03:19 +05:30
|
|
|
'emailActivations' => EmailActivationFixture::class,
|
2016-05-11 01:10:06 +05:30
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testInstantiate() {
|
2016-10-29 05:53:29 +05:30
|
|
|
$this->assertInstanceOf(confirmations\RegistrationConfirmation::class, EmailActivation::findOne([
|
|
|
|
'type' => EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION,
|
|
|
|
]));
|
|
|
|
|
|
|
|
$this->assertInstanceOf(confirmations\ForgotPassword::class, EmailActivation::findOne([
|
|
|
|
'type' => EmailActivation::TYPE_FORGOT_PASSWORD_KEY,
|
|
|
|
]));
|
|
|
|
|
|
|
|
$this->assertInstanceOf(confirmations\CurrentEmailConfirmation::class, EmailActivation::findOne([
|
|
|
|
'type' => EmailActivation::TYPE_CURRENT_EMAIL_CONFIRMATION,
|
|
|
|
]));
|
|
|
|
|
|
|
|
$this->assertInstanceOf(confirmations\NewEmailConfirmation::class, EmailActivation::findOne([
|
|
|
|
'type' => EmailActivation::TYPE_NEW_EMAIL_CONFIRMATION,
|
|
|
|
]));
|
2016-05-11 01:10:06 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
}
|