public function testCheckSetupOAuth2ExtensionSubView()
 {
     //set login info
     $user = User::where('identifier', '=', 'sebastian.marcet')->first();
     Auth::login($user);
     $scope = array(sprintf('%s/resource-server/read', $this->current_realm), sprintf('%s/resource-server/read.page', $this->current_realm), sprintf('%s/resource-server/write', $this->current_realm), sprintf('%s/resource-server/delete', $this->current_realm), sprintf('%s/resource-server/update', $this->current_realm), sprintf('%s/resource-server/update.status', $this->current_realm), sprintf('%s/resource-server/regenerate.secret', $this->current_realm));
     $params = array(OpenIdProtocol::param(OpenIdProtocol::OpenIDProtocol_NS) => OpenIdProtocol::OpenID2MessageType, OpenIdProtocol::param(OpenIdProtocol::OpenIDProtocol_Mode) => OpenIdProtocol::SetupMode, OpenIdProtocol::param(OpenIdProtocol::OpenIDProtocol_Realm) => "https://www.test.com/", OpenIdProtocol::param(OpenIdProtocol::OpenIDProtocol_ReturnTo) => "https://www.test.com/oauth2", OpenIdProtocol::param(OpenIdProtocol::OpenIDProtocol_Identity) => "http://specs.openid.net/auth/2.0/identifier_select", OpenIdProtocol::param(OpenIdProtocol::OpenIDProtocol_ClaimedId) => "http://specs.openid.net/auth/2.0/identifier_select", OpenIdOAuth2Extension::paramNamespace() => OpenIdOAuth2Extension::NamespaceUrl, OpenIdOAuth2Extension::param(OpenIdOAuth2Extension::ClientId) => $this->oauth2_client_id, OpenIdOAuth2Extension::param(OpenIdOAuth2Extension::Scope) => implode(' ', $scope), OpenIdOAuth2Extension::param(OpenIdOAuth2Extension::State) => uniqid());
     $response = $this->action("POST", "OpenIdProviderController@endpoint", $params);
     $this->assertResponseStatus(302);
     $content = $response->getContent();
 }
 /**
  * @return null|string
  */
 public function getState()
 {
     return isset($this->message[OpenIdOAuth2Extension::param(OAuth2Protocol::OAuth2Protocol_State, '_')]) ? $this->message[OpenIdOAuth2Extension::param(OAuth2Protocol::OAuth2Protocol_State, '_')] : null;
 }