public function testAppendChildToElementThrowsError() { $this->setExpectedException('Saml\\Ecp\\Soap\\Exception\\AppendChildException'); $child = $this->_getDomElementMock(); $element = $child = $this->_getDomElementMock(); $element->expects($this->once())->method('appendChild')->with($child)->will($this->throwException(new \DomException())); $this->_message->appendChildToElement($element, $child); }
/** * Copies the body elements from the provided SOAP message. * * @param Message $message */ public function copyBodyFromMessage(Message $message) { $bodyElements = $message->getBodyElements(); foreach ($bodyElements as $element) { $this->addBodyElement($element); } }
/** * {@inheritdoc} * @see \Saml\Ecp\Soap\Container\ContainerInterface::setSoapMessage() */ public function setSoapMessage(Message $soapMessage) { $this->_soapMessage = $soapMessage; $this->setContent($this->_soapMessage->toString()); }
/** * @dataProvider dataProvidergetNodeValueByXpath */ public function testGetNodeValueByXpath($xpathQuery, $nodeValue) { $this->_message->fromString($this->_getSoapData()); $this->assertSame($nodeValue, $this->_message->getNodeValueByXpath($xpathQuery)); }