@@ -488,9 +488,9 @@ public function testSetBaseURL()
488488 $ this ->assertEquals ($ expectedUrl , OneLogin_Saml2_Utils::getSelfURL ());
489489
490490 OneLogin_Saml2_Utils::setBaseURL ("http://anothersp.example.com:81/example2/ " );
491- $ expectedUrlNQ2 = 'http://anothersp.example.com:81/example2/route.php ' ;
492- $ expectedRoutedUrlNQ2 = 'http://anothersp.example.com:81/example2/route.php ' ;
493- $ expectedUrl2 = 'http://anothersp.example.com:81/example2/route.php?x=test ' ;
491+ $ expectedUrlNQ2 = 'http://anothersp.example.com:81/example2/example1/ route.php ' ;
492+ $ expectedRoutedUrlNQ2 = 'http://anothersp.example.com:81/example2/example1/ route.php ' ;
493+ $ expectedUrl2 = 'http://anothersp.example.com:81/example2/example1/ route.php?x=test ' ;
494494
495495 $ this ->assertEquals ('http ' , OneLogin_Saml2_Utils::getSelfProtocol ());
496496 $ this ->assertEquals ('anothersp.example.com ' , OneLogin_Saml2_Utils::getSelfHost ());
@@ -502,11 +502,17 @@ public function testSetBaseURL()
502502 $ this ->assertEquals ($ expectedUrl2 , OneLogin_Saml2_Utils::getSelfURL ());
503503
504504 $ _SERVER ['PATH_INFO ' ] = '/test ' ;
505- $ expectedUrlNQ2 = 'http://anothersp.example.com:81/example2/route.php/test ' ;
505+ $ expectedUrlNQ2 = 'http://anothersp.example.com:81/example2/example1/ route.php/test ' ;
506506
507507 $ this ->assertEquals ($ expectedUrlNQ2 , OneLogin_Saml2_Utils::getSelfURLNoQuery ());
508508 $ this ->assertEquals ($ expectedRoutedUrlNQ2 , OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery ());
509509 $ this ->assertEquals ($ expectedUrl2 , OneLogin_Saml2_Utils::getSelfURL ());
510+
511+ OneLogin_Saml2_Utils::setBaseURL ("http://anothersp.example.com:81/example2 " );
512+ $ this ->assertEquals ($ expectedUrlNQ2 , OneLogin_Saml2_Utils::getSelfURLNoQuery ());
513+ $ this ->assertEquals ($ expectedRoutedUrlNQ2 , OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery ());
514+ $ this ->assertEquals ($ expectedUrl2 , OneLogin_Saml2_Utils::getSelfURL ());
515+ $ this ->assertEquals ('/example2/ ' , OneLogin_Saml2_Utils::getBaseURLPath ());
510516 }
511517
512518 /**
0 commit comments