text() public method

Gets the text of this node (if there is any text). Or get all the text in this node, including children.
public text ( boolean $lookInChildren = false ) : string
$lookInChildren boolean
return string
 public function testTextLookInChildrenAndNoChildren()
 {
     $p = new HtmlNode('p');
     $a = new HtmlNode('a');
     $a->addChild(new TextNode('click me'));
     $p->addChild(new TextNode('Please '));
     $p->addChild($a);
     $p->addChild(new TextNode('!'));
     $p->text;
     $p->text(true);
     $this->assertEquals('Please click me!', $p->text(true));
 }