Fix two minor bugs, updating Phorum and removing unused $dir variable.
[htmlpurifier/darkodev.git] / tests / HTMLPurifier / ErrorsHarness.php
blobf7c673ca53b124aaa561aac35c43fbcc507f6f70
1 <?php
3 /**
4 * @todo Make the callCount variable actually work, so we can precisely
5 * specify what errors we want: no more, no less
6 */
7 class HTMLPurifier_ErrorsHarness extends HTMLPurifier_Harness
10 protected $config, $context;
11 protected $collector, $generator, $callCount;
13 public function setup() {
14 $this->config = HTMLPurifier_Config::create(array('Core.CollectErrors' => true));
15 $this->context = new HTMLPurifier_Context();
16 generate_mock_once('HTMLPurifier_ErrorCollector');
17 $this->collector = new HTMLPurifier_ErrorCollectorEMock();
18 $this->collector->prepare($this->context);
19 $this->context->register('ErrorCollector', $this->collector);
20 $this->callCount = 0;
23 protected function expectNoErrorCollection() {
24 $this->collector->expectNever('send');
27 protected function expectErrorCollection() {
28 $args = func_get_args();
29 $this->collector->expectOnce('send', $args);
32 protected function expectContext($key, $value) {
33 $this->collector->expectContext($key, $value);
38 // vim: et sw=4 sts=4