CssSelectorExpectation::__construct PHP Method

__construct() public method

Sets the dom tree and the css selector to compare against
public __construct ( mixed $dom, mixed $selector, string $message = '%s' )
$dom mixed Dom tree to search into.
$selector mixed Css selector to match element.
$message string Customised message on failure.
    public function __construct($dom, $selector, $message = '%s')
    {
        parent::__construct($message);
        $this->dom = $dom;
        $this->selector = $selector;
        $css_selector = new CssSelector($this->dom);
        $this->value = $css_selector->getTexts($this->selector);
    }