SAML2\XML\md\NameIDTest::testUnmarshalling PHP Method

testUnmarshalling() public method

public testUnmarshalling ( )
    public function testUnmarshalling()
    {
        $samlNamespace = Constants::NS_SAML;
        $document = DOMDocumentFactory::fromString(<<<XML
<saml:NameID xmlns:saml="{$samlNamespace}" NameQualifier="TheNameQualifier" SPNameQualifier="TheSPNameQualifier" Format="TheFormat" SPProvidedID="TheSPProvidedID">TheNameIDValue</saml:NameID>
XML
);
        $nameId = new NameID($document->firstChild);
        $this->assertEquals('TheNameQualifier', $nameId->NameQualifier);
        $this->assertEquals('TheSPNameQualifier', $nameId->SPNameQualifier);
        $this->assertEquals('TheFormat', $nameId->Format);
        $this->assertEquals('TheSPProvidedID', $nameId->SPProvidedID);
        $this->assertEquals('TheNameIDValue', $nameId->value);
    }