Improve auto-paragraph to preserve newlines and handle edge-cases better.
[htmlpurifier.git] / tests / HTMLPurifier / AttrDefHarness.php
blob4f2ef6305093802b0ab8c4fa59e0ef487cd397d5
1 <?php
3 class HTMLPurifier_AttrDefHarness extends HTMLPurifier_Harness
6 protected $def;
7 protected $context, $config;
9 public function setUp() {
10 $this->config = HTMLPurifier_Config::createDefault();
11 $this->context = new HTMLPurifier_Context();
14 // cannot be used for accumulator
15 function assertDef($string, $expect = true) {
16 // $expect can be a string or bool
17 $result = $this->def->validate($string, $this->config, $this->context);
18 if ($expect === true) {
19 $this->assertIdentical($string, $result);
20 } else {
21 $this->assertIdentical($expect, $result);