public function setUp()
 {
     $repo = m::mock('Xpressengine\\Member\\Repositories\\VirtualGroupRepositoryInterface');
     $repo->shouldReceive('fetchAllByMember')->with(null)->andReturn([]);
     $repo->shouldReceive('fetchAllByMember')->with(m::on(function ($arg) {
         return $arg !== null;
     }))->andReturn([(object) ['id' => 'virtual', 'title' => 'Virtual']]);
     AbstractRegisteredPermission::setVirtualGroupRepository($repo);
 }
 /**
  * Service Provider Boot
  *
  * @return void
  */
 public function boot()
 {
     $this->app['xe.pluginRegister']->add(PermissionUIObject::class);
     AbstractRegisteredPermission::setVirtualGroupRepository($this->app['xe.member.virtualGroups']);
 }