Always quote the contents of url() in CSS.
[htmlpurifier.git] / tests / HTMLPurifier / AttrDef / CSS / ListStyleTest.php
blob8fd43e59aabc3b7b835aa18b4383ef1c7e17927b
1 <?php
3 class HTMLPurifier_AttrDef_CSS_ListStyleTest extends HTMLPurifier_AttrDefHarness
6 function test() {
8 $config = HTMLPurifier_Config::createDefault();
9 $this->def = new HTMLPurifier_AttrDef_CSS_ListStyle($config);
11 $this->assertDef('lower-alpha');
12 $this->assertDef('upper-roman inside');
13 $this->assertDef('circle outside');
14 $this->assertDef('inside');
15 $this->assertDef('none');
16 $this->assertDef('url(\'foo.gif\')');
17 $this->assertDef('circle url(\'foo.gif\') inside');
19 // invalid values
20 $this->assertDef('outside inside', 'outside');
22 // ordering
23 $this->assertDef('url(foo.gif) none', 'none url(\'foo.gif\')');
24 $this->assertDef('circle lower-alpha', 'circle');
25 // the spec is ambiguous about what happens in these
26 // cases, so we're going off the W3C CSS validator
27 $this->assertDef('disc none', 'disc');
28 $this->assertDef('none disc', 'none');
35 // vim: et sw=4 sts=4