예제 #1
0
 public function testItCanCreateAclForCurrentlyLoggedUser()
 {
     $user = new User();
     $acl = $this->getMockBuilder(\ACL::class)->disableOriginalConstructor()->getMock();
     $this->authenticator->expects($this->once())->method('getUser')->willReturn($user);
     $this->aclProvider->expects($this->once())->method('get')->with($user)->willReturn($acl);
     $this->assertSame($acl, $this->sut->getAclForUser());
 }
예제 #2
0
 public function __construct(Application $app)
 {
     parent::__construct($app);
     $this->oAuth2Adapter = $app['oauth2-server'];
 }
 public function __construct(Application $app)
 {
     parent::__construct($app);
     $this->translator = $app['translator'];
     $this->logger = $app['monolog'];
 }