accounts/tests/codeception/common/templates/fixtures/user.php

18 lines
454 B
PHP
Raw Normal View History

<?php
/**
* @var $faker \Faker\Generator
* @var $index integer
*/
$security = Yii::$app->getSecurity();
return [
'username' => $faker->userName,
'email' => $faker->email,
'auth_key' => $security->generateRandomString(),
'password_hash' => $security->generatePasswordHash('password_' . $index),
'password_reset_token' => $security->generateRandomString() . '_' . time(),
'created_at' => time(),
'updated_at' => time(),
];