コード例 #1
0
 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);
 }
コード例 #2
0
 /**
  * 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);
     }
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  * @see \Saml\Ecp\Soap\Container\ContainerInterface::setSoapMessage()
  */
 public function setSoapMessage(Message $soapMessage)
 {
     $this->_soapMessage = $soapMessage;
     $this->setContent($this->_soapMessage->toString());
 }
コード例 #4
0
 /**
  * @dataProvider dataProvidergetNodeValueByXpath
  */
 public function testGetNodeValueByXpath($xpathQuery, $nodeValue)
 {
     $this->_message->fromString($this->_getSoapData());
     $this->assertSame($nodeValue, $this->_message->getNodeValueByXpath($xpathQuery));
 }