1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-10 16:14:08 +02:00

Commit a very lenient mailto checker. We'll tighten it later.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@219 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-08-12 19:11:21 +00:00
parent d28bad648a
commit 4193fd018a
5 changed files with 53 additions and 9 deletions

View File

@@ -8,18 +8,18 @@ class HTMLPurifier_AttrDefHarness extends UnitTestCase
var $config;
// cannot be used for accumulator
function assertDef($string, $expect = true, $message = '%s') {
function assertDef($string, $expect = true, $ini = false, $message = '%s') {
// $expect can be a string or bool
if (!$this->config) $this->config = HTMLPurifier_Config::createDefault();
if (!$this->context) $this->context = new HTMLPurifier_AttrContext();
$this->setUpAssertDef();
if ($ini) $this->setUpAssertDef();
$result = $this->def->validate($string, $this->config, $this->context);
if ($expect === true) {
$this->assertIdentical($string, $result, $message);
} else {
$this->assertIdentical($expect, $result, $message);
}
$this->tearDownAssertDef();
if ($ini) $this->tearDownAssertDef();
}
function setUpAssertDef() {}