コード例 #1
0
 public function testGetAuthorizeServerWithClientStorageAndAuthorizationCodeResponseType()
 {
     // must set AccessToken or AuthorizationCode
     $server = new OAuth2_Server();
     $server->addStorage($this->getMock('OAuth2_Storage_ClientInterface'));
     $server->addResponseType($this->getMock('OAuth2_ResponseType_AuthorizationCodeInterface'));
     $this->assertNotNull($server->getAuthorizeController());
 }
コード例 #2
0
 /**
  * @expectedException InvalidArgumentException OAuth2_ResponseType_AuthorizationCodeInterface
  **/
 public function testAddingUnknownResponseTypeThrowsException()
 {
     $server = new OAuth2_Server();
     $server->addResponseType($this->getMock('OAuth2_ResponseTypeInterface'));
 }