3 class HTMLPurifier_AttrDef_HTML_NmtokensTest
extends HTMLPurifier_AttrDefHarness
8 $this->def
= new HTMLPurifier_AttrDef_HTML_Nmtokens();
11 function testDefault() {
13 $this->assertDef('valid');
14 $this->assertDef('a0-_');
15 $this->assertDef('-valid');
16 $this->assertDef('_valid');
17 $this->assertDef('double valid');
19 $this->assertDef('0invalid', false);
20 $this->assertDef('-0', false);
22 // test conditional replacement
23 $this->assertDef('validassoc 0invalid', 'validassoc');
25 // test whitespace leniency
26 $this->assertDef(" double\nvalid\r", 'double valid');
28 // test case sensitivity
29 $this->assertDef('VALID');