3 require_once 'HTMLPurifier/ErrorCollectorEMock.php';
4 require_once 'HTMLPurifier/Lexer/DirectLex.php';
6 class HTMLPurifier_ErrorsHarness
extends HTMLPurifier_Harness
10 var $collector, $generator;
13 $this->config
= HTMLPurifier_Config
::create(array('Core.CollectErrors' => true));
14 $this->context
= new HTMLPurifier_Context();
15 generate_mock_once('HTMLPurifier_ErrorCollector');
16 $this->collector
= new HTMLPurifier_ErrorCollectorEMock();
17 $this->collector
->prepare($this->context
);
18 $this->context
->register('ErrorCollector', $this->collector
);
21 function expectErrorCollection() {
22 $args = func_get_args();
23 $this->collector
->expectOnce('send', $args);
26 function expectContext($key, $value) {
27 $this->collector
->expectContext($key, $value);