public function highlightNode($prepend = '<span style="background-color:#ff0">', $append = '</span>') { return TemplateHelper::highlightNode($this->node, $prepend, $append); }
/** * @testdox highlightNode() tests * @dataProvider getHighlights */ public function testHighlightNode($query, $template, $expected) { $dom = TemplateHelper::loadTemplate($template); $xpath = new DOMXPath($dom); $this->assertSame($expected, TemplateHelper::highlightNode($xpath->query($query)->item(0), '<span style="background-color:#ff0">', '</span>')); }