@@ -488,9 +488,9 @@ public function testSetBaseURL()
488
488
$ this ->assertEquals ($ expectedUrl , OneLogin_Saml2_Utils::getSelfURL ());
489
489
490
490
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 ' ;
494
494
495
495
$ this ->assertEquals ('http ' , OneLogin_Saml2_Utils::getSelfProtocol ());
496
496
$ this ->assertEquals ('anothersp.example.com ' , OneLogin_Saml2_Utils::getSelfHost ());
@@ -502,11 +502,17 @@ public function testSetBaseURL()
502
502
$ this ->assertEquals ($ expectedUrl2 , OneLogin_Saml2_Utils::getSelfURL ());
503
503
504
504
$ _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 ' ;
506
506
507
507
$ this ->assertEquals ($ expectedUrlNQ2 , OneLogin_Saml2_Utils::getSelfURLNoQuery ());
508
508
$ this ->assertEquals ($ expectedRoutedUrlNQ2 , OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery ());
509
509
$ 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 ());
510
516
}
511
517
512
518
/**
0 commit comments