/** * @param DOMElement $element * @param string $xpath * @return boolean */ public function inputMatches(DOMElement $element, $xpath) { return (bool) $this->reader->query($xpath, $element)->item(0); }
/** * @param string $xpath * @return DOMNodeList */ public function getChildren($xpath) { return $this->reader->query($xpath, $this->element); }
/** * @param LoaderInterface $loader * @param DOMDocument $document */ public function __construct(LoaderInterface $loader, DOMDocument $document) { $this->loader = $loader; parent::__construct($document); }
/** * @covers ::select */ public function testSelectException() { $reader = new Reader($this->document); $this->setExpectedException('BadMethodCallException', 'Cannot select on SP\\Crawler\\Element\\Anchor, //a[@id="navlink-1"]'); $reader->select('//a[@id="navlink-1"]'); }