Пример #1
0
 /**
  * Creating a Role to User.
  */
 public function testCommandShouldMakeARoleToUser()
 {
     $this->artisan('defender:make:role', ['name' => 'user.role', '--user' => 1]);
     $this->seeInDatabase(config('defender.role_table', 'roles'), ['name' => 'user.role']);
     $user = User::find(1);
     $this->assertEquals('user.role', $user->roles->where('name', 'user.role')->first()->name);
 }