mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 07:38:41 +00:00
1945ddca5c
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@161 48356398-32a2-884e-a903-53898d9a118a
24 lines
613 B
PHP
24 lines
613 B
PHP
<?php
|
|
|
|
class HTMLPurifier_AttrDefHarness extends UnitTestCase
|
|
{
|
|
|
|
var $def;
|
|
var $id_accumulator;
|
|
var $config;
|
|
|
|
// cannot be used for accumulator
|
|
function assertDef($string, $expect = true) {
|
|
// $expect can be a string or bool
|
|
if (!$this->config) $this->config = HTMLPurifier_Config::createDefault();
|
|
$result = $this->def->validate($string, $this->config, $this->id_accumulator);
|
|
if ($expect === true) {
|
|
$this->assertIdentical($string, $result);
|
|
} else {
|
|
$this->assertIdentical($expect, $result);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
?>
|