/** * @covers OneLogin_Saml2_Utils::setProxyVars() * @covers OneLogin_Saml2_Utils::getProxyVars() */ public function testProxyvars() { $this->assertFalse(OneLogin_Saml2_Utils::getProxyVars()); OneLogin_Saml2_Utils::setProxyVars(true); $this->assertTrue(OneLogin_Saml2_Utils::getProxyVars()); $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https'; $_SERVER['SERVER_PORT'] = '80'; $this->assertTrue(OneLogin_Saml2_Utils::isHTTPS()); OneLogin_Saml2_Utils::setProxyVars(false); $this->assertFalse(OneLogin_Saml2_Utils::isHTTPS()); }