/** * @group ZF-5310 */ public function testCanTransformWithAttributeAndDot() { $test = Query::cssToXpath('a[href="http://example.com"]'); $this->assertEquals("//a[@href='http://example.com']", $test); $test = Query::cssToXpath('a[@href="http://example.com"]'); $this->assertEquals("//a[@href='http://example.com']", $test); }
/** * Perform a CSS selector query * * @param string $query * @return NodeList */ public function execute($query) { $xpathQuery = Document\Query::cssToXpath($query); return $this->queryXpath($xpathQuery, $query); }
/** * Perform a CSS selector query * * @param string $query * @param DOMNode $contextNode * @return NodeList */ public function execute($query, DOMNode $contextNode = null) { $xpathQuery = Document\Query::cssToXpath($query); return $this->queryXpath($xpathQuery, $query, $contextNode); }