public function testManyNameIDThrowsException()
{
$samlNamespace = Constants::NS_SAML;
$document = DOMDocumentFactory::fromString(<<<XML
<saml:SubjectConfirmation xmlns:saml="{$samlNamespace}" Method="SomeMethod">
<saml:NameID>SomeNameIDValue</saml:NameID>
<saml:NameID>AnotherNameIDValue</saml:NameID>
<saml:SubjectConfirmationData/>
</saml:SubjectConfirmation>
XML
);
$this->setExpectedException('Exception', 'More than one NameID in a SubjectConfirmation element');
$subjectConfirmation = new SubjectConfirmation($document->firstChild);
}