function assertExtractStyleBlocks($html, $expect = true, $styles = array()) { $filter = new HTMLPurifier_Filter_ExtractStyleBlocks(); // disable cleaning if ($expect === true) { $expect = $html; } $this->config->set('Filter.ExtractStyleBlocks.TidyImpl', false); $result = $filter->preFilter($html, $this->config, $this->context); $this->assertIdentical($result, $expect); $this->assertIdentical($this->context->get('StyleBlocks'), $styles); }