mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 00:41:52 +00:00
24c64dbbac
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@256 48356398-32a2-884e-a903-53898d9a118a
20 lines
571 B
PHP
20 lines
571 B
PHP
<?php
|
|
|
|
class HTMLPurifier_AttrTransformHarness extends UnitTestCase
|
|
{
|
|
|
|
var $transform;
|
|
|
|
function assertTransform($inputs, $expect, $config = array()) {
|
|
$default_config = HTMLPurifier_Config::createDefault();
|
|
foreach ($inputs as $i => $input) {
|
|
if (!isset($config[$i])) $config[$i] = $default_config;
|
|
$result = $this->transform->transform($input, $config[$i]);
|
|
if ($expect[$i] === true) $expect[$i] = $input;
|
|
$this->assertEqual($expect[$i], $result, "Test $i: %s");
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
?>
|