/**
  * @expectedException RuntimeException
  */
 public function testAccessAllowOnResourcePermission()
 {
     $res = TestResource::create(['name' => 'resource']);
     $perm = Permission::create(['name' => 'permission']);
     $res->addPermissionTo('show', $perm);
     $perm = $res->mergedPermissions()->first();
     $var = $perm->allow;
 }
Beispiel #2
0
 protected function createFakes()
 {
     return [TestUser::create(['name' => 'user']), Role::create(['name' => 'role']), Permission::create(['name' => 'permission']), TestResource::create(['name' => 'resource'])];
 }