コード例 #1
0
 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);
 }
コード例 #2
0
 /**
  * Service Provider Boot
  *
  * @return void
  */
 public function boot()
 {
     $this->app['xe.pluginRegister']->add(PermissionUIObject::class);
     AbstractRegisteredPermission::setVirtualGroupRepository($this->app['xe.member.virtualGroups']);
 }