Add vim modelines to all files.
[htmlpurifier.git] / tests / HTMLPurifier / AttrDef / EnumTest.php
blob7722c1bc2d06334e162a725f6f2fe2a3394bcdee
1 <?php
3 class HTMLPurifier_AttrDef_EnumTest extends HTMLPurifier_AttrDefHarness
6 function testCaseInsensitive() {
7 $this->def = new HTMLPurifier_AttrDef_Enum(array('one', 'two'));
8 $this->assertDef('one');
9 $this->assertDef('ONE', 'one');
12 function testCaseSensitive() {
13 $this->def = new HTMLPurifier_AttrDef_Enum(array('one', 'two'), true);
14 $this->assertDef('one');
15 $this->assertDef('ONE', false);
18 function testFixing() {
19 $this->def = new HTMLPurifier_AttrDef_Enum(array('one'));
20 $this->assertDef(' one ', 'one');
23 function test_make() {
24 $factory = new HTMLPurifier_AttrDef_Enum();
26 $def = $factory->make('foo,bar');
27 $def2 = new HTMLPurifier_AttrDef_Enum(array('foo', 'bar'));
28 $this->assertIdentical($def, $def2);
30 $def = $factory->make('s:foo,BAR');
31 $def2 = new HTMLPurifier_AttrDef_Enum(array('foo', 'BAR'), true);
32 $this->assertIdentical($def, $def2);
37 // vim: et sw=4 sts=4