You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
595B

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