@@ -437,7 +437,7 @@ public function testWeCanChooseToDeflateAResponseBody()
437437 //Test that we can choose not to compress the request payload.
438438 $ settingsDir = TEST_ROOT .'/settings/ ' ;
439439 include $ settingsDir .'settings1.php ' ;
440-
440+
441441 //Compression is currently turned on in settings.
442442 $ settings = new OneLogin_Saml2_Settings ($ settingsInfo );
443443 $ logoutResponse = new OneLogin_Saml2_LogoutResponse ($ settings , $ message );
@@ -448,7 +448,7 @@ public function testWeCanChooseToDeflateAResponseBody()
448448 //Test that we can choose not to compress the request payload.
449449 $ settingsDir = TEST_ROOT .'/settings/ ' ;
450450 include $ settingsDir .'settings2.php ' ;
451-
451+
452452 //Compression is currently turned on in settings.
453453 $ settings = new OneLogin_Saml2_Settings ($ settingsInfo );
454454 $ logoutResponse = new OneLogin_Saml2_LogoutResponse ($ settings , $ message );
@@ -497,9 +497,26 @@ public function testGetID()
497497 $ xml = $ logoutResponse ->getXML ();
498498 $ id1 = $ logoutResponse ->getID ();
499499 $ this ->assertNotNull ($ id1 );
500-
500+
501501 $ processedLogoutResponse = new OneLogin_Saml2_LogoutResponse ($ settings , base64_encode ($ xml ));
502502 $ id2 = $ processedLogoutResponse ->getID ();
503503 $ this ->assertEquals ($ id1 , $ id2 );
504504 }
505+
506+ /**
507+ * Tests that the LogoutRequest throws an exception
508+ *
509+ * @covers OneLogin_Saml2_LogoutRequest::getID()
510+ *
511+ * @expectedException OneLogin_Saml2_Error
512+ * @expectedExceptionMessage XML is invalid
513+ */
514+ public function testGetIDException ()
515+ {
516+ $ settingsDir = TEST_ROOT .'/settings/ ' ;
517+ include $ settingsDir .'settings1.php ' ;
518+
519+ $ settings = new OneLogin_Saml2_Settings ($ settingsInfo );
520+ $ logoutResponse = new OneLogin_Saml2_LogoutResponse ($ settings , '<garbage> ' );
521+ }
505522}
0 commit comments