Exemplo n.º 1
0
 /**
  * @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);
 }
Exemplo n.º 2
0
 /**
  * Perform a CSS selector query
  *
  * @param  string $query
  * @return NodeList
  */
 public function execute($query)
 {
     $xpathQuery = Document\Query::cssToXpath($query);
     return $this->queryXpath($xpathQuery, $query);
 }
Exemplo n.º 3
0
 /**
  * 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);
 }