SAML2\XML\shibmd\ScopeTest::testMarshallingImplicitRegexpValue PHP Method

testMarshallingImplicitRegexpValue() public method

Marshalling a scope which does not specificy the value for regexp explicitly (expect it to default to 'false').
    public function testMarshallingImplicitRegexpValue()
    {
        $scope = new Scope();
        $scope->scope = "example.org";
        $document = DOMDocumentFactory::fromString('<root />');
        $scopeElement = $scope->toXML($document->firstChild);
        $scopeElements = Utils::xpQuery($scopeElement, '/root/shibmd:Scope');
        $this->assertCount(1, $scopeElements);
        $scopeElement = $scopeElements[0];
        $this->assertEquals('example.org', $scopeElement->nodeValue);
        $this->assertEquals('urn:mace:shibboleth:metadata:1.0', $scopeElement->namespaceURI);
        $this->assertEquals('false', $scopeElement->getAttribute('regexp'));
    }