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.

35 lines
1.1KB

  1. <?php
  2. class HTMLPurifier_AttrDef_CSS_FontTest extends HTMLPurifier_AttrDefHarness
  3. {
  4. public function test()
  5. {
  6. $config = HTMLPurifier_Config::createDefault();
  7. $this->def = new HTMLPurifier_AttrDef_CSS_Font($config);
  8. // hodgepodge of usage cases from W3C spec, but " -> '
  9. $this->assertDef('12px/14px sans-serif');
  10. $this->assertDef('80% sans-serif');
  11. $this->assertDef("x-large/110% 'New Century Schoolbook', serif");
  12. $this->assertDef('bold italic large Palatino, serif');
  13. $this->assertDef('normal small-caps 120%/120% fantasy');
  14. $this->assertDef("300 italic 1.3em/1.7em 'FB Armada', sans-serif");
  15. $this->assertDef('600 9px Charcoal');
  16. $this->assertDef('600 9px/ 12px Charcoal', '600 9px/12px Charcoal');
  17. // spacing
  18. $this->assertDef('12px / 14px sans-serif', '12px/14px sans-serif');
  19. // system fonts
  20. $this->assertDef('menu');
  21. $this->assertDef('800', false);
  22. $this->assertDef('600 9px//12px Charcoal', false);
  23. }
  24. }
  25. // vim: et sw=4 sts=4