3 class HTMLPurifier_AttrDefHarness
extends HTMLPurifier_Harness
7 protected $context, $config;
9 public function setUp()
11 $this->config
= HTMLPurifier_Config
::createDefault();
12 $this->context
= new HTMLPurifier_Context();
15 // cannot be used for accumulator
16 public function assertDef($string, $expect = true, $or_false = false)
18 // $expect can be a string or bool
19 $result = $this->def
->validate($string, $this->config
, $this->context
);
20 if ($expect === true) {
21 if (!($or_false && $result === false)) {
22 $this->assertIdentical($string, $result);
25 if (!($or_false && $result === false)) {
26 $this->assertIdentical($expect, $result);