config = HTMLPurifier_Config::create(array('Core.CollectErrors' => true)); $this->context = new HTMLPurifier_Context(); generate_mock_once('HTMLPurifier_ErrorCollector'); $this->collector = new HTMLPurifier_ErrorCollectorMock($this); $this->context->register('ErrorCollector', $this->collector); } function expectErrorCollection() { $args = func_get_args(); $this->collector->expectOnce('send', $args); } } ?>