Release 2.0.1, merged in 1181 to HEAD.
[htmlpurifier.git] / tests / HTMLPurifier / AttrDef / CSS / FontTest.php
blob48650864ee85951e3c68a6aa772ebc3253a9df97
1 <?php
3 require_once 'HTMLPurifier/AttrDefHarness.php';
4 require_once 'HTMLPurifier/AttrDef/CSS/Font.php';
6 class HTMLPurifier_AttrDef_CSS_FontTest extends HTMLPurifier_AttrDefHarness
9 function test() {
11 $config = HTMLPurifier_Config::createDefault();
12 $this->def = new HTMLPurifier_AttrDef_CSS_Font($config);
14 // hodgepodge of usage cases from W3C spec, but " -> '
15 $this->assertDef('12px/14px sans-serif');
16 $this->assertDef('80% sans-serif');
17 $this->assertDef('x-large/110% \'New Century Schoolbook\', serif');
18 $this->assertDef('bold italic large Palatino, serif');
19 $this->assertDef('normal small-caps 120%/120% fantasy');
20 $this->assertDef('300 italic 1.3em/1.7em \'FB Armada\', sans-serif');
21 $this->assertDef('600 9px Charcoal');
22 $this->assertDef('600 9px/ 12px Charcoal', '600 9px/12px Charcoal');
24 // spacing
25 $this->assertDef('12px / 14px sans-serif', '12px/14px sans-serif');
27 // system fonts
28 $this->assertDef('menu');
30 $this->assertDef('800', false);
31 $this->assertDef('600 9px//12px Charcoal', false);