3 class HTMLPurifier_AttrDef_CSS_AlphaValueTest
extends HTMLPurifier_AttrDefHarness
8 $this->def
= new HTMLPurifier_AttrDef_CSS_AlphaValue();
10 $this->assertDef('0');
11 $this->assertDef('1');
12 $this->assertDef('.2');
14 // clamping to [0.0, 1,0]
15 $this->assertDef('1.2', '1');
16 $this->assertDef('-3', '0');
18 $this->assertDef('0.0', '0');
19 $this->assertDef('1.0', '1');
20 $this->assertDef('000', '0');
22 $this->assertDef('asdf', false);