innerHtml() public method

Gets the inner html of this node.
public innerHtml ( ) : string
return string
 /**
  * @expectedException PHPHtmlParser\Exceptions\UnknownChildTypeException
  */
 public function testInnerHtmlUnkownChild()
 {
     $div = new Tag('div');
     $div->setAttributes(['class' => ['value' => 'all', 'doubleQuote' => true]]);
     $a = new Tag('a');
     $a->setAttributes(['href' => ['value' => 'http://google.com', 'doubleQuote' => false]]);
     $br = new Tag('br');
     $br->selfClosing();
     $parent = new HtmlNode($div);
     $childa = new HtmlNode($a);
     $childbr = new MockNode($br);
     $parent->addChild($childa);
     $parent->addChild($childbr);
     $childa->addChild(new TextNode('link'));
     $inner = $parent->innerHtml();
     $this->assertEquals($inner, $parent->innerHtml());
 }
 /**
  * Returns the inner html of the root node.
  *
  * @return string
  */
 public function __toString()
 {
     return $this->root->innerHtml();
 }