/** * Parsers the html of the given string. Used for load(), loadFromFile(), * and loadFromUrl(). * * @param string $str * @param array $option * @chainable */ protected function loadStr($str, $option) { $this->options = new Options(); $this->options->setOptions($this->globalOptions)->setOptions($option); $this->rawSize = strlen($str); $this->raw = $str; $html = $this->clean($str); $this->size = strlen($str); $this->content = new Content($html); $this->parse(); $this->detectCharset(); return $this; }
public function testAddingOver() { $options = new Options(); $options->setOptions(['test' => false])->setOptions(['test' => true, 'whitespaceTextNode' => false]); $this->assertFalse($options->get('whitespaceTextNode')); }