public function testRevokeAccess()
 {
     $manipulator = new ApiAccountManipulator(self::$DI['app']['EM'], self::$DI['app']['repo.api-accounts']);
     $account = $manipulator->create(self::$DI['oauth2-app-user'], self::$DI['user']);
     $manipulator->revokeAccess($account);
     $this->assertTrue($account->isRevoked());
 }
Exemplo n.º 2
0
 public function testUpdate()
 {
     $manipulator = new ApiAccountManipulator(self::$DI['app']['EM'], self::$DI['app']['repo.api-accounts']);
     $account = $manipulator->create(self::$DI['oauth2-app-user'], self::$DI['user']);
     $manipulator = new ApiLogManipulator(self::$DI['app']['EM'], self::$DI['app']['repo.api-logs']);
     $log = $manipulator->create($account, Request::create('/databoxes/list/', 'POST'), new Response());
     $log->setAspect('a-new-aspect');
     $manipulator->update($log);
     $log = self::$DI['app']['repo.api-logs']->find($log->getId());
     $this->assertEquals('a-new-aspect', $log->getAspect());
 }
 public function testRevokeAccess()
 {
     $account = $this->sut->create(self::$DI['oauth2-app-user'], self::$DI['user']);
     $this->sut->revokeAccess($account);
     $this->assertTrue($account->isRevoked());
 }