/** @dataProvider getXpathLiteralTestData */
public function testXpathLiteral($value,
$literal) { $this->
assertEquals($literal, Translator::
getXpathLiteral($value));
} /** @dataProvider getCssToXPathTestData */
public function testCssToXPath($css,
$xpath) { $translator =
new Translator();
$translator->
registerExtension(new HtmlExtension($translator));
$this->
assertEquals($xpath,
$translator->
cssToXPath($css, ''
));
} public function testCssToXPathPseudoElement() { $this->
expectException(ExpressionErrorException::
class);
$translator =
new Translator();
$translator->
registerExtension(new HtmlExtension($translator));
$translator->
cssToXPath('e::first-line'
);
}