Fix bug with non-lower case color names in HTML.
[htmlpurifier.git] / tests / HTMLPurifier / AttrDef / HTML / ColorTest.php
blobf2b2181111f8051b4019302d35623613c8060434
1 <?php
3 class HTMLPurifier_AttrDef_HTML_ColorTest extends HTMLPurifier_AttrDefHarness
6 function test() {
7 $this->def = new HTMLPurifier_AttrDef_HTML_Color();
8 $this->assertDef('', false);
9 $this->assertDef('foo', false);
10 $this->assertDef('43', false);
11 $this->assertDef('red', '#FF0000');
12 $this->assertDef('RED', '#FF0000');
13 $this->assertDef('#FF0000');
14 $this->assertDef('#453443');
15 $this->assertDef('453443', '#453443');
16 $this->assertDef('#345', '#334455');
17 $this->assertDef('120', '#112200');
21 // vim: et sw=4 sts=4