mirror of
https://github.com/elyby/accounts.git
synced 2024-12-12 16:39:01 +05:30
df6d319187
Загрузчик конфигов выделен в отдельный класс authserverHost выделена в params Исправлены некоторые common.unit тесты, т.к. наследовались не от того базового класса
32 lines
1006 B
PHP
32 lines
1006 B
PHP
<?php
|
|
namespace codeception\common\unit\models;
|
|
|
|
use Codeception\Specify;
|
|
use common\models\confirmations\ForgotPassword;
|
|
use common\models\confirmations\RegistrationConfirmation;
|
|
use common\models\EmailActivation;
|
|
use tests\codeception\common\fixtures\EmailActivationFixture;
|
|
use tests\codeception\common\unit\DbTestCase;
|
|
|
|
class EmailActivationTest extends DbTestCase {
|
|
use Specify;
|
|
|
|
public function fixtures() {
|
|
return [
|
|
'emailActivations' => EmailActivationFixture::class,
|
|
];
|
|
}
|
|
|
|
public function testInstantiate() {
|
|
$this->specify('return valid model type', function() {
|
|
expect(EmailActivation::findOne([
|
|
'type' => EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION,
|
|
]))->isInstanceOf(RegistrationConfirmation::class);
|
|
expect(EmailActivation::findOne([
|
|
'type' => EmailActivation::TYPE_FORGOT_PASSWORD_KEY,
|
|
]))->isInstanceOf(ForgotPassword::class);
|
|
});
|
|
}
|
|
|
|
}
|