MultiLengthTest.php 574 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. class HTMLPurifier_AttrDef_HTML_MultiLengthTest extends HTMLPurifier_AttrDef_HTML_LengthTest
  3. {
  4. function setup() {
  5. $this->def = new HTMLPurifier_AttrDef_HTML_MultiLength();
  6. }
  7. function test() {
  8. // length check
  9. parent::test();
  10. $this->assertDef('*');
  11. $this->assertDef('1*', '*');
  12. $this->assertDef('56*');
  13. $this->assertDef('**', false); // plain old bad
  14. $this->assertDef('5.4*', '5*'); // no decimals
  15. $this->assertDef('-3*', false); // no negatives
  16. }
  17. }
  18. // vim: et sw=4 sts=4