/** * Tests the getSelfRoutedURLNoQuery method of the OneLogin_Saml2_Utils * * @covers OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery */ public function getSelfRoutedURLNoQuery() { $url = OneLogin_Saml2_Utils::getSelfURLhost(); $_SERVER['REQUEST_URI'] = 'example1/route?x=test'; $_SERVER['QUERY_STRING'] = '?x=test'; $url .= 'example1/route'; $this->assertEquals($url, OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery()); }
* as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ require_once dirname(__FILE__) . '/../../includes/core.inc.php'; include_once dirname(dirname(dirname(__FILE__))) . '/PEAR/php-saml/_toolkit_loader.php'; if (!defined('SAML2_REDIRECT_URI')) { define('SAML2_REDIRECT_URI', OneLogin_Saml2_Utils::getSelfURLhost()); } function send_error($message) { die(<<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" \t"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> \t<title>SAML2 Error</title> \t<meta http-equiv="content-type" content="text/html;charset=utf-8" /> \t<link rel="stylesheet" type="text/css" href="/ovd/media/style/webclient.css" /> </head> <body> \t<div id="overlay"> \t\t<div class="shadowBox" id="systemTestError">