protected function setUp()
 {
     parent::setUp();
     Phake::when($this->facade)->is_user_logged_in()->thenReturn(true);
     Phake::when($this->facade)->wp_get_current_user()->thenReturn($this->user);
     Phake::when($this->wpdb)->get_var(Phake::anyParameters())->thenReturn('true');
 }
 protected function setUp()
 {
     parent::setUp();
     $this->user->ID = "User ID";
     Phake::when($this->user)->get("launchkey_sso_session")->thenReturn(self::SESSION_INDEX);
     foreach ($_REQUEST as $key => $value) {
         unset($_REQUEST[$key]);
     }
     $_REQUEST["SAMLRequest"] = self::SAML_REQUEST;
     Phake::when($this->facade)->get_user_by(Phake::anyParameters())->thenReturn($this->user);
     Phake::when($this->facade)->time(Phake::anyParameters())->thenReturn(static::NOW);
     Phake::when($this->facade)->site_url(Phake::anyParameters())->thenReturn(static::SSO_POST_URL);
     Phake::when($this->saml_request_service)->get_session_index()->thenReturn(static::SESSION_INDEX);
     Phake::when($this->saml_request_service)->get_name()->thenReturn(static::NAME);
     Phake::when($this->saml_request_service)->is_request_for_entity(Phake::anyParameters())->thenReturn(true);
     Phake::when($this->saml_request_service)->is_timestamp_within_restrictions(Phake::anyParameters())->thenReturn(true);
     Phake::when($this->saml_request_service)->is_valid_destination(Phake::anyParameters())->thenReturn(true);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->options = array(LaunchKey_WP_Options::OPTION_ROCKET_KEY => 12345, LaunchKey_WP_Options::OPTION_APP_DISPLAY_NAME => 'App Display Name');
     $that = $this;
     Phake::when($this->facade)->get_option(Phake::anyParameters())->thenReturnCallback(function () use($that) {
         return $that->options;
     });
     Phake::when($this->facade)->get_site_option(Phake::anyParameters())->thenReturnCallback(function () use($that) {
         return $that->options;
     });
     Phake::when($this->template)->render_template(Phake::anyParameters())->thenReturnCallback(function ($template) {
         return "Rendered [{$template}]";
     });
     Phake::when($this->facade)->wp_login_url(Phake::anyParameters())->thenReturn("WP Login URL");
 }
 protected function setUp()
 {
     parent::setUp();
     $this->user->ID = "User ID";
     foreach ($_REQUEST as $key => $value) {
         unset($_REQUEST[$key]);
     }
     $_REQUEST["SAMLResponse"] = self::SAML_RESPONSE;
     Phake::when($this->facade)->get_user_by(Phake::anyParameters())->thenReturn($this->user);
     Phake::when($this->facade)->wp_get_current_user()->thenReturn($this->user);
     Phake::when($this->facade)->time(Phake::anyParameters())->thenReturn(static::NOW);
     Phake::when($this->facade)->site_url(Phake::anyParameters())->thenReturn(static::SSO_POST_URL);
     Phake::when($this->saml_response_service)->get_session_index()->thenReturn(static::SESSION_INDEX);
     Phake::when($this->saml_response_service)->get_name()->thenReturn(static::NAME);
     Phake::when($this->saml_response_service)->get_attribute(Phake::anyParameters())->thenReturn(array(static::ATTRIBUTE_VALUE));
     Phake::when($this->saml_response_service)->is_entity_in_audience(Phake::anyParameters())->thenReturn(true);
     Phake::when($this->saml_response_service)->is_timestamp_within_restrictions(Phake::anyParameters())->thenReturn(true);
     Phake::when($this->saml_response_service)->is_valid_destination(Phake::anyParameters())->thenReturn(true);
     Phake::when($this->saml_response_service)->is_session_index_registered()->thenReturn(false);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->user->ID = "User ID";
     Phake::when($this->facade)->wp_get_current_user(Phake::anyParameters())->thenReturn($this->user);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->client = Phake::partialMock('LaunchKey_WP_SSO_Client', $this->facade, $this->template, static::ENTITY_ID, $this->saml_response_service, $this->saml_request_service, $this->wpdb, static::LOGIN_URL, static::LOGOUT_URL, static::ERROR_URL, false);
 }