/**
* Tests the getSessionNotOnOrAfter method of the OneLogin_Saml2_Response
*
* @covers OneLogin_Saml2_Response::getSessionNotOnOrAfter
*/
public function testGetSessionNotOnOrAfter()
{
$xml = file_get_contents(TEST_ROOT . '/data/responses/response1.xml.base64');
$response = new OneLogin_Saml2_Response($this->_settings, $xml);
$this->assertEquals(1290203857, $response->getSessionNotOnOrAfter());
// An assertion that do not specified Session timeout should return NULL
$xml2 = file_get_contents(TEST_ROOT . '/data/responses/response2.xml.base64');
$response2 = new OneLogin_Saml2_Response($this->_settings, $xml2);
$this->assertNull($response2->getSessionNotOnOrAfter());
$xml3 = file_get_contents(TEST_ROOT . '/data/responses/valid_encrypted_assertion.xml.base64');
$response3 = new OneLogin_Saml2_Response($this->_settings, $xml3);
$this->assertEquals(2696012228, $response3->getSessionNotOnOrAfter());
}