mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Rework email_activation model, get rid of behaviors, use json column to store additional data
This commit is contained in:
30
common/tests/fixtures/data/email-activations.php
vendored
30
common/tests/fixtures/data/email-activations.php
vendored
@@ -1,46 +1,56 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use common\models\EmailActivation;
|
||||
|
||||
return [
|
||||
'freshRegistrationConfirmation' => [
|
||||
'key' => 'HABGCABHJ1234HBHVD',
|
||||
'account_id' => 3,
|
||||
'type' => \common\models\EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION,
|
||||
'type' => EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION,
|
||||
'data' => null,
|
||||
'created_at' => time(),
|
||||
],
|
||||
'oldRegistrationConfirmation' => [
|
||||
'key' => 'H23HBDCHHAG2HGHGHS',
|
||||
'account_id' => 4,
|
||||
'type' => \common\models\EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION,
|
||||
'created_at' => time() - (new \common\models\confirmations\RegistrationConfirmation())->repeatTimeout - 10,
|
||||
'type' => EmailActivation::TYPE_REGISTRATION_EMAIL_CONFIRMATION,
|
||||
'data' => null,
|
||||
'created_at' => Carbon::now()->subMinutes(5)->subSeconds(10)->unix(),
|
||||
],
|
||||
'freshPasswordRecovery' => [
|
||||
'key' => 'H24HBDCHHAG2HGHGHS',
|
||||
'account_id' => 5,
|
||||
'type' => \common\models\EmailActivation::TYPE_FORGOT_PASSWORD_KEY,
|
||||
'type' => EmailActivation::TYPE_FORGOT_PASSWORD_KEY,
|
||||
'data' => null,
|
||||
'created_at' => time(),
|
||||
],
|
||||
'oldPasswordRecovery' => [
|
||||
'key' => 'H25HBDCHHAG2HGHGHS',
|
||||
'account_id' => 6,
|
||||
'type' => \common\models\EmailActivation::TYPE_FORGOT_PASSWORD_KEY,
|
||||
'created_at' => time() - (new \common\models\confirmations\ForgotPassword())->repeatTimeout - 10,
|
||||
'type' => EmailActivation::TYPE_FORGOT_PASSWORD_KEY,
|
||||
'data' => null,
|
||||
'created_at' => Carbon::now()->subMinutes(30)->subSeconds(10)->unix(),
|
||||
],
|
||||
'currentChangeEmailConfirmation' => [
|
||||
'key' => 'H27HBDCHHAG2HGHGHS',
|
||||
'account_id' => 7,
|
||||
'type' => \common\models\EmailActivation::TYPE_CURRENT_EMAIL_CONFIRMATION,
|
||||
'type' => EmailActivation::TYPE_CURRENT_EMAIL_CONFIRMATION,
|
||||
'data' => null,
|
||||
'created_at' => time() - 10,
|
||||
],
|
||||
'newEmailConfirmation' => [
|
||||
'key' => 'H28HBDCHHAG2HGHGHS',
|
||||
'account_id' => 8,
|
||||
'type' => \common\models\EmailActivation::TYPE_NEW_EMAIL_CONFIRMATION,
|
||||
'_data' => serialize(['newEmail' => 'my-new-email@ely.by']),
|
||||
'type' => EmailActivation::TYPE_NEW_EMAIL_CONFIRMATION,
|
||||
'data' => ['newEmail' => 'my-new-email@ely.by'],
|
||||
'created_at' => time() - 10,
|
||||
],
|
||||
'deeplyExpiredConfirmation' => [
|
||||
'key' => 'H29HBDCHHAG2HGHGHS',
|
||||
'account_id' => 1,
|
||||
'type' => \common\models\EmailActivation::TYPE_NEW_EMAIL_CONFIRMATION,
|
||||
'type' => EmailActivation::TYPE_NEW_EMAIL_CONFIRMATION,
|
||||
'data' => null,
|
||||
'created_at' => 1487695872,
|
||||
],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user