mirror of
https://github.com/elyby/accounts.git
synced 2024-11-06 16:21:08 +05:30
36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
namespace common\tests\unit\models;
|
|
|
|
use common\models\confirmations;
|
|
use common\models\EmailActivation;
|
|
use common\tests\fixtures\EmailActivationFixture;
|
|
use common\tests\unit\TestCase;
|
|
|
|
class EmailActivationTest extends TestCase {
|
|
|
|
public function _fixtures(): array {
|
|
return [
|
|
'emailActivations' => EmailActivationFixture::class,
|
|
];
|
|
}
|
|
|
|
public function testInstantiate() {
|
|
$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,
|
|
]));
|
|
}
|
|
|
|
}
|