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()); }
/** * @expectedException InvalidArgumentException OAuth2_ResponseType_AuthorizationCodeInterface **/ public function testAddingUnknownResponseTypeThrowsException() { $server = new OAuth2_Server(); $server->addResponseType($this->getMock('OAuth2_ResponseTypeInterface')); }