protected function doExecute(ProfileContext $context) { if ($context->getRelayState()) { $this->logger->debug(sprintf('RelayState from context set to outbound message: "%s"', $context->getRelayState()), LogHelper::getActionContext($context, $this)); MessageContextHelper::asSamlMessage($context->getOutboundContext())->setRelayState($context->getRelayState()); } }
public function test_gets_set_relay_state() { $profileContext = new ProfileContext(Profiles::METADATA, ProfileContext::ROLE_IDP); $profileContext->setRelayState($expected = 'some-state'); $this->assertEquals($expected, $profileContext->getRelayState()); }