コード例 #1
0
 public function test_sets_not_on_or_after_to_outbound_logout_request()
 {
     $timeProviderMock = $this->getTimeProviderMock();
     $action = new SetNotOnOrAfterAction($this->getLoggerMock(), $timeProviderMock, $skew = 100);
     $context = new ProfileContext(Profiles::SSO_IDP_RECEIVE_AUTHN_REQUEST, ProfileContext::ROLE_IDP);
     $context->getOutboundContext()->setMessage($logoutRequest = new LogoutRequest());
     $timeProviderMock->expects($this->once())->method('getTimestamp')->willReturn($baseTimestamp = 1445953125);
     $action->execute($context);
     $expectedTimestamp = $baseTimestamp + $skew;
     $this->assertEquals($expectedTimestamp, $logoutRequest->getNotOnOrAfterTimestamp());
 }