public function getTexts($selector) { $texts = array(); foreach ($this->getElements($selector) as $element) { $texts[] = $element->nodeValue; } return $texts; }
/** * Sets the dom tree and the css selector to compare against * @param mixed $dom Dom tree to search into. * @param mixed $selector Css selector to match element. * @param string $message Customised message on failure. * @access public */ function CssSelectorExpectation($dom, $selector, $message = '%s') { $this->SimpleExpectation($message); $this->_dom = $dom; $this->_selector = $selector; $css_selector = new CssSelector($this->_dom); $this->_value = $css_selector->getTexts($this->_selector); }