SAML2\StatusResponseTest::testStatusSuccess PHP Метод

testStatusSuccess() публичный Метод

A status reponse that is not an error
public testStatusSuccess ( )
    public function testStatusSuccess()
    {
        $xml = <<<XML
<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
                xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
                ID="s2a0da3504aff978b0f8c80f6a62c713c4a2f64c5b"
                InResponseTo="_bec424fa5103428909a30ff1e31168327f79474984"
                Version="2.0"
                IssueInstant="2007-12-10T11:39:48Z"
                Destination="http://somewhere.example.org/simplesaml/saml2/sp/AssertionConsumerService.php">
    <saml:Issuer>max.example.org</saml:Issuer>
    <samlp:Status>
        <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
    </samlp:Status>
</samlp:Response>
XML;
        $fixtureResponseDom = DOMDocumentFactory::fromString($xml);
        $response = new Response($fixtureResponseDom->firstChild);
        $this->assertTrue($response->isSuccess());
        $status = $response->getStatus();
        $this->assertEquals("urn:oasis:names:tc:SAML:2.0:status:Success", $status['Code']);
        $this->assertNull($status['SubCode']);
        $this->assertNull($status['Message']);
    }