use Symfony\Component\CssSelector\Node\FunctionNode;
use Symfony\Component\CssSelector\Parser\Parser;
use Symfony\Component\CssSelector\XPath\Extension\HtmlExtension;
use Symfony\Component\CssSelector\XPath\Translator;
use Symfony\Component\CssSelector\XPath\XPathExpr;
class TranslatorTest extends TestCase
{ /** @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() {