1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-20 04:41:32 +02:00

Document all AttrDefs, also remove duplicant NumberSpan in favor of Integer.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@308 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-08-20 21:47:15 +00:00
parent ca0914789c
commit 314a48373c
25 changed files with 176 additions and 73 deletions

View File

@@ -1,28 +0,0 @@
<?php
require_once 'HTMLPurifier/AttrDefHarness.php';
require_once 'HTMLPurifier/AttrDef/NumberSpan.php';
class HTMLPurifier_AttrDef_NumberSpanTest extends HTMLPurifier_AttrDefHarness
{
function test() {
$this->def = new HTMLPurifier_AttrDef_NumberSpan();
// this one requires a little explanation. A colspan="1" shouldn't
// exist at all: it's just a dud, since the default value is already
// supplied
$this->assertDef('1', false);
$this->assertDef('4');
$this->assertDef('4.5', '4'); // round down (truncate)
$this->assertDef('0', false);
$this->assertDef('-4', false);
$this->assertDef('asdf', false);
}
}
?>

View File

@@ -61,7 +61,6 @@ $test_files[] = 'AttrDef/TextTest.php';
$test_files[] = 'AttrDef/LangTest.php';
$test_files[] = 'AttrDef/PixelsTest.php';
$test_files[] = 'AttrDef/LengthTest.php';
$test_files[] = 'AttrDef/NumberSpanTest.php';
$test_files[] = 'AttrDef/URITest.php';
$test_files[] = 'AttrDef/CSSTest.php';
$test_files[] = 'AttrDef/CompositeTest.php';