File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -33,18 +33,23 @@ public function testGetAttributes()
3333        $ this assertEquals ($ expectedAttributes$ responsegetAttributes ());
3434
3535        // An assertion that has no attributes should return an empty array when asked for the attributes 
36-         $ assertionfile_get_contents (TEST_ROOT  . '/responses/wrapped_response_2 .xml.base64 ' );
36+         $ assertionfile_get_contents (TEST_ROOT  . '/responses/response2 .xml.base64 ' );
3737        $ responsenew  OneLogin_Saml_Response ($ this _settings , $ assertion
3838
3939        $ this assertEmpty ($ responsegetAttributes ());
4040    }
4141
42-     public  function  testOnlyRetreiveAssertionWithIDThatMatchesSignatureReference ()
42+     public  function  testOnlyRetrieveAssertionWithIDThatMatchesSignatureReference ()
4343    {
4444        $ assertionfile_get_contents (TEST_ROOT  . '/responses/wrapped_response_2.xml.base64 ' );
4545        $ responsenew  OneLogin_Saml_Response ($ this _settings , $ assertion
46- 
47-         $ this ->
assertNotEquals (
'[email protected]  , 
$ response->
getNameId ());
 46+         try  {
47+             $ nameId$ responsegetNameId ();
48+             $ this ->
assertNotEquals (
'[email protected]  , 
$ nameId);
 49+         }
50+         catch  (Exception $ e
51+             $ this assertNotEmpty ($ egetMessage (), 'Trying to get NameId on an unsigned assertion fails ' );
52+         }
4853    }
4954
5055    public  function  testDoesNotAllowSignatureWrappingAttack ()
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments