mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-20 10:27:18 +08:00

- Moved everything test-related into `tests` directory. Codeception tests are in `codeception`. - Removed database module since we're using fixtures and migrations. - Moved console entry points and bootstrap into `tests/codeception/bin`. - Adjusted travis build scripts. - Adjusted documentation to be consistent and reflect changes made.
18 lines
454 B
PHP
18 lines
454 B
PHP
<?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(),
|
|
];
|