Esempio n. 1
0
 public function run()
 {
     $faker = Factory::create();
     //User::truncate();
     foreach (range(1, 50) as $index) {
         User::create(['username' => $faker->userName, 'password' => $faker->password(8, 20), 'email' => $faker->email, 'profile_state' => $faker->boolean()]);
     }
 }
Esempio n. 2
0
 /**
  */
 public function testRegister()
 {
     $email = '*****@*****.**';
     $password = Hash::make('password');
     $username = '******';
     $status = TRUE;
     $profile_state = FALSE;
     User::create(['email' => $email, 'password' => $password, 'username' => $username, 'status' => $status, 'profile_state' => $profile_state]);
     $this->tester->seeRecord('users', ['email' => $email, 'username' => $username, 'password' => $password]);
 }
Esempio n. 3
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param array $data        	
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['email' => $data['email'], 'username' => $data['name'], 'password' => bcrypt($data['password']), 'status' => TRUE, 'profile_state' => FALSE]);
 }