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