Exemplo n.º 1
0
 /**
  * A basic fixture test example
  *
  * @return void
  */
 public function testBasicFixture()
 {
     $user = Sentry::findUserByLogin('*****@*****.**');
     $this->assertEquals('Benevolent', $user->first_name);
     $this->assertEquals('Dictator', $user->last_name);
     $brand = Groups::getBrandProvider()->findByTitle('BizGym');
     $this->assertTrue(Groups::isAdmin($user->id, $brand->id));
 }
 public function run()
 {
     // Refresh Brand_user_groups
     DB::table('group_user_brand')->truncate();
     $entries = array(array('user_id' => Sentry::findUserByLogin('*****@*****.**')->id, 'group_id' => Sentry::findGroupByName('Admin')->id, 'brand_id' => Groups::getBrandProvider()->findByTitle('BizGym')->id), array('user_id' => Sentry::findUserByLogin('*****@*****.**')->id, 'group_id' => Sentry::findGroupByName('User')->id, 'brand_id' => Groups::getBrandProvider()->findByTitle('SaaS Venture Group')->id), array('user_id' => Sentry::findUserByLogin('*****@*****.**')->id, 'group_id' => Sentry::findGroupByName('Admin')->id, 'brand_id' => Groups::getBrandProvider()->findByTitle('BizGym')->id), array('user_id' => Sentry::findUserByLogin('*****@*****.**')->id, 'group_id' => Sentry::findGroupByName('User')->id, 'brand_id' => Groups::getBrandProvider()->findByTitle('SaaS Venture Group')->id));
     // Uncomment the below to run the seeder
     DB::table('group_user_brand')->insert($entries);
 }