assertEquals('foo bar', $node->text()); } public function testGetTag() { $node = new TextNode('foo bar'); $this->assertEquals('text', $node->getTag()->name()); } public function testAncestorByTag() { $node = new TextNode('foo bar'); $text = $node->ancestorByTag('text'); $this->assertEquals($node, $text); } public function testPreserveEntity() { $node = new TextNode('i'); $text = $node->innerhtml; $this->assertEquals('i', $text); } }