public function testGetAuthorizeControllerWithClientStorageAndAuthorizationCodeStorage()
 {
     // must set AccessToken or AuthorizationCode
     $server = new Server();
     $server->addStorage($this->getMock('OAuth2\\Storage\\ClientInterface'));
     $server->addStorage($this->getMock('OAuth2\\Storage\\AuthorizationCodeInterface'));
     $this->assertNotNull($server->getAuthorizeController());
 }
 public function testUsingOpenIDConnectWithAllowImplicitAndAccessTokenResponseTypeIsOkay()
 {
     $client = $this->getMock('OAuth2\\Storage\\ClientInterface');
     $userclaims = $this->getMock('OAuth2\\OpenID\\Storage\\UserClaimsInterface');
     $pubkey = $this->getMock('OAuth2\\Storage\\PublicKeyInterface');
     // $token = $this->getMock('OAuth2\Storage\AccessTokenInterface');
     $server = new Server(array($client, $userclaims, $pubkey), array('use_openid_connect' => true, 'issuer' => 'someguy', 'allow_implicit' => true));
     $token = $this->getMock('OAuth2\\ResponseType\\AccessTokenInterface');
     $server->addResponseType($token, 'token');
     $server->getAuthorizeController();
     $this->assertInstanceOf('OAuth2\\OpenID\\ResponseType\\IdTokenInterface', $server->getResponseType('id_token'));
     $this->assertInstanceOf('OAuth2\\OpenID\\ResponseType\\IdTokenTokenInterface', $server->getResponseType('id_token token'));
 }