PSR-2 reformatting PHPDoc corrections
[htmlpurifier.git] / tests / HTMLPurifier / AttrDef / EnumTest.php
blobdda4dae13a729d7ca450b8b640d45e37d60d77a7
1 <?php
3 class HTMLPurifier_AttrDef_EnumTest extends HTMLPurifier_AttrDefHarness
6 public function testCaseInsensitive()
8 $this->def = new HTMLPurifier_AttrDef_Enum(array('one', 'two'));
9 $this->assertDef('one');
10 $this->assertDef('ONE', 'one');
13 public function testCaseSensitive()
15 $this->def = new HTMLPurifier_AttrDef_Enum(array('one', 'two'), true);
16 $this->assertDef('one');
17 $this->assertDef('ONE', false);
20 public function testFixing()
22 $this->def = new HTMLPurifier_AttrDef_Enum(array('one'));
23 $this->assertDef(' one ', 'one');
26 public function test_make()
28 $factory = new HTMLPurifier_AttrDef_Enum();
30 $def = $factory->make('foo,bar');
31 $def2 = new HTMLPurifier_AttrDef_Enum(array('foo', 'bar'));
32 $this->assertIdentical($def, $def2);
34 $def = $factory->make('s:foo,BAR');
35 $def2 = new HTMLPurifier_AttrDef_Enum(array('foo', 'BAR'), true);
36 $this->assertIdentical($def, $def2);
41 // vim: et sw=4 sts=4