Exemple #1
0
 /**
  * @covers ByJG\Util\XmlUtil::innerText
  * @todo   Implement testInnerText().
  */
 public function testInnerText()
 {
     $dom = XmlUtil::createXmlDocumentFromStr('<root><a><item arg="1"/><item arg="2"><b1/><b2/></item><item arg="3"/></a></root>');
     $node = XmlUtil::selectSingleNode($dom->documentElement, 'a/item[@arg="2"]');
     $text = XmlUtil::innerText($node);
     $this->assertEquals("\n<b1/><b2/>\n", $text);
 }