Example #1
0
 public function testMarshalling()
 {
     $response = new Response();
     $response->setConsent(Constants::CONSENT_EXPLICIT);
     $response->setIssuer('SomeIssuer');
     $responseElement = $response->toUnsignedXML();
     $this->assertTrue($responseElement->hasAttribute('Consent'));
     $this->assertEquals($responseElement->getAttribute('Consent'), Constants::CONSENT_EXPLICIT);
     $issuerElements = Utils::xpQuery($responseElement, './saml_assertion:Issuer');
     $this->assertCount(1, $issuerElements);
     $this->assertEquals('SomeIssuer', $issuerElements[0]->textContent);
 }