SAML2\XML\saml\SubjectConfirmationTest::testMethodMissingThrowsException PHP Method

testMethodMissingThrowsException() public method

    public function testMethodMissingThrowsException()
    {
        $samlNamespace = Constants::NS_SAML;
        $document = DOMDocumentFactory::fromString(<<<XML
<saml:SubjectConfirmation xmlns:saml="{$samlNamespace}">
  <saml:NameID>SomeNameIDValue</saml:NameID>
  <saml:SubjectConfirmationData/>
</saml:SubjectConfirmation>
XML
);
        $this->setExpectedException('Exception', 'SubjectConfirmation element without Method attribute');
        $subjectConfirmation = new SubjectConfirmation($document->firstChild);
    }