Skip to content

Commit 47eea7f

Browse files
committed
Fix test for php5.3
1 parent ba415aa commit 47eea7f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/src/OneLogin/Saml2/LogoutRequestTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,15 @@ public function testGetNameIdData()
374374
$this->assertContains('NameID not found in the Logout Request', $e->getMessage());
375375
}
376376

377-
$logoutRequest = new OneLogin_Saml2_LogoutRequest($this->_settings, null, "ONELOGIN_1e442c129e1f822c8096086a1103c5ee2c7cae1c", null, OneLogin_Saml2_Constants::NAMEID_PERSISTENT, $this->_settings->getIdPData()['entityId'], $this->_settings->getSPData()['entityId']);
377+
$idpData = $this->_settings->getIdPData();
378+
$spData = $this->_settings->getSPData();
379+
$logoutRequest = new OneLogin_Saml2_LogoutRequest($this->_settings, null, "ONELOGIN_1e442c129e1f822c8096086a1103c5ee2c7cae1c", null, OneLogin_Saml2_Constants::NAMEID_PERSISTENT, $idpData['entityId'], $spData['entityId']);
378380
$logoutRequestStr = $logoutRequest->getXML();
379381
$this->assertContains('ONELOGIN_1e442c129e1f822c8096086a1103c5ee2c7cae1c', $logoutRequestStr);
380382
$this->assertContains('Format="'.OneLogin_Saml2_Constants::NAMEID_PERSISTENT, $logoutRequestStr);
381-
$this->assertContains('NameQualifier="'.$this->_settings->getIdPData()['entityId'], $logoutRequestStr);
382-
$this->assertContains('SPNameQualifier="'.$this->_settings->getSPData()['entityId'], $logoutRequestStr);
383-
$logoutRequest2 = new OneLogin_Saml2_LogoutRequest($this->_settings, null, "ONELOGIN_1e442c129e1f822c8096086a1103c5ee2c7cae1c", null, OneLogin_Saml2_Constants::NAMEID_ENTITY, $this->_settings->getIdPData()['entityId'], $this->_settings->getSPData()['entityId']);
383+
$this->assertContains('NameQualifier="'.$idpData['entityId'], $logoutRequestStr);
384+
$this->assertContains('SPNameQualifier="'.$spData['entityId'], $logoutRequestStr);
385+
$logoutRequest2 = new OneLogin_Saml2_LogoutRequest($this->_settings, null, "ONELOGIN_1e442c129e1f822c8096086a1103c5ee2c7cae1c", null, OneLogin_Saml2_Constants::NAMEID_ENTITY, $idpData['entityId'], $spData['entityId']);
384386
$logoutRequestStr2 = $logoutRequest2->getXML();
385387
$this->assertContains('ONELOGIN_1e442c129e1f822c8096086a1103c5ee2c7cae1c', $logoutRequestStr2);
386388
$this->assertContains('Format="'.OneLogin_Saml2_Constants::NAMEID_ENTITY, $logoutRequestStr2);

0 commit comments

Comments
 (0)