@@ -92,6 +92,18 @@ public function testGetSLOurl()
9292 $ this ->assertEquals ($ this ->_auth ->getSLOurl (), $ sloUrl );
9393 }
9494
95+ /**
96+ * Tests the getSLOResponseUrl method of the Auth class
97+ *
98+ * @covers OneLogin\Saml2\Auth::getSLOurl
99+ */
100+ public function testGetSLOResponseUrl ()
101+ {
102+ $ sloUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['responseUrl ' ];
103+ $ this ->assertEquals ($ this ->_auth ->getSLOResponseUrl (), $ sloUrl );
104+ }
105+
106+
95107 /**
96108 * Tests the processResponse method of the Auth class
97109 * Case No Response, An exception is throw
@@ -620,8 +632,8 @@ public function testProcessSLORequestInvalidValid()
620632 $ parsedQuery = getParamsFromUrl ($ targetUrl );
621633
622634 $ this ->assertEmpty ($ this ->_auth ->getErrors ());
623- $ sloUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['url ' ];
624- $ this ->assertContains ($ sloUrl , $ targetUrl );
635+ $ sloResponseUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['responseUrl ' ];
636+ $ this ->assertContains ($ sloResponseUrl , $ targetUrl );
625637 $ this ->assertArrayHasKey ('SAMLResponse ' , $ parsedQuery );
626638 $ this ->assertArrayNotHasKey ('RelayState ' , $ parsedQuery );
627639
@@ -635,8 +647,8 @@ public function testProcessSLORequestInvalidValid()
635647 $ parsedQuery = getParamsFromUrl ($ targetUrl );
636648
637649 $ this ->assertEmpty ($ this ->_auth ->getErrors ());
638- $ sloUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['url ' ];
639- $ this ->assertContains ($ sloUrl , $ targetUrl );
650+ $ sloResponseUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['responseUrl ' ];
651+ $ this ->assertContains ($ sloResponseUrl , $ targetUrl );
640652 $ this ->assertArrayHasKey ('SAMLResponse ' , $ parsedQuery );
641653 $ this ->assertArrayNotHasKey ('RelayState ' , $ parsedQuery );
642654 }
@@ -704,8 +716,8 @@ public function testProcessSLORequestDeletingSession()
704716 $ targetUrl = getUrlFromRedirect ($ trace );
705717 $ parsedQuery = getParamsFromUrl ($ targetUrl );
706718
707- $ sloUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['url ' ];
708- $ this ->assertContains ($ sloUrl , $ targetUrl );
719+ $ sloResponseUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['responseUrl ' ];
720+ $ this ->assertContains ($ sloResponseUrl , $ targetUrl );
709721 $ this ->assertArrayHasKey ('SAMLResponse ' , $ parsedQuery );
710722 $ this ->assertArrayNotHasKey ('RelayState ' , $ parsedQuery );
711723
@@ -725,8 +737,8 @@ public function testProcessSLORequestDeletingSession()
725737 $ targetUrl = getUrlFromRedirect ($ trace );
726738 $ parsedQuery = getParamsFromUrl ($ targetUrl );
727739
728- $ sloUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['url ' ];
729- $ this ->assertContains ($ sloUrl , $ targetUrl );
740+ $ sloResponseUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['responseUrl ' ];
741+ $ this ->assertContains ($ sloResponseUrl , $ targetUrl );
730742 $ this ->assertArrayHasKey ('SAMLResponse ' , $ parsedQuery );
731743 $ this ->assertArrayNotHasKey ('RelayState ' , $ parsedQuery );
732744
@@ -778,8 +790,8 @@ public function testProcessSLORequestDeletingSessionCallback()
778790 $ targetUrl = getUrlFromRedirect ($ trace );
779791 $ parsedQuery = getParamsFromUrl ($ targetUrl );
780792
781- $ sloUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['url ' ] ;
782- $ this ->assertContains ($ sloUrl , $ targetUrl );
793+ $ sloResponseUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['responseUrl ' ];; ;
794+ $ this ->assertContains ($ sloResponseUrl , $ targetUrl );
783795 $ this ->assertArrayHasKey ('SAMLResponse ' , $ parsedQuery );
784796 $ this ->assertArrayNotHasKey ('RelayState ' , $ parsedQuery );
785797
@@ -828,8 +840,8 @@ public function testProcessSLORequestRelayState()
828840 $ targetUrl = getUrlFromRedirect ($ trace );
829841 $ parsedQuery = getParamsFromUrl ($ targetUrl );
830842
831- $ sloUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['url ' ];
832- $ this ->assertContains ($ sloUrl , $ targetUrl );
843+ $ sloResponseUrl = $ this ->_settingsInfo ['idp ' ]['singleLogoutService ' ]['responseUrl ' ];
844+ $ this ->assertContains ($ sloResponseUrl , $ targetUrl );
833845 $ this ->assertArrayHasKey ('SAMLResponse ' , $ parsedQuery );
834846 $ this ->assertArrayHasKey ('RelayState ' , $ parsedQuery );
835847 $ this ->assertEquals ('http://relaystate.com ' , $ parsedQuery ['RelayState ' ]);
@@ -876,8 +888,8 @@ public function testProcessSLORequestSignedResponse()
876888 $ targetUrl = getUrlFromRedirect ($ trace );
877889 $ parsedQuery = getParamsFromUrl ($ targetUrl );
878890
879- $ sloUrl = $ settingsInfo ['idp ' ]['singleLogoutService ' ]['url ' ];
880- $ this ->assertContains ($ sloUrl , $ targetUrl );
891+ $ sloResponseUrl = $ this -> _settingsInfo ['idp ' ]['singleLogoutService ' ]['responseUrl ' ];
892+ $ this ->assertContains ($ sloResponseUrl , $ targetUrl );
881893 $ this ->assertArrayHasKey ('SAMLResponse ' , $ parsedQuery );
882894 $ this ->assertArrayHasKey ('RelayState ' , $ parsedQuery );
883895 $ this ->assertArrayHasKey ('SigAlg ' , $ parsedQuery );
0 commit comments