mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +02:00
[3.1.1] Have CSS/Length.php use the new Length class. Also, put onus of non-negative to callee, which would compare $n.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1751 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -20,10 +20,10 @@ class HTMLPurifier_LengthTest extends HTMLPurifier_Harness
|
||||
$this->assertIdentical($l->toString(), '23in');
|
||||
}
|
||||
|
||||
protected function assertValidate($string, $expect = true, $disable_negative = false) {
|
||||
protected function assertValidate($string, $expect = true) {
|
||||
if ($expect === true) $expect = $string;
|
||||
$l = HTMLPurifier_Length::make($string);
|
||||
$result = $l->isValid($disable_negative);
|
||||
$result = $l->isValid();
|
||||
if ($result === false) $this->assertIdentical($expect, false);
|
||||
else $this->assertIdentical($l->toString(), $expect);
|
||||
}
|
||||
@@ -45,7 +45,6 @@ class HTMLPurifier_LengthTest extends HTMLPurifier_Harness
|
||||
$this->assertValidate('3PX', '3px');
|
||||
$this->assertValidate('3', false);
|
||||
$this->assertValidate('3miles', false);
|
||||
$this->assertValidate('-3mm', false, true); // no-negatives
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user