You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simple-yewu/tests/codeception/common/templates/fixtures/user.php

18 lines
454 B

5 years ago
<?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(),
];