Fix CSS URL innerHTML/cssText escaping bug.
[htmlpurifier.git] / tests / HTMLPurifier / AttrDef / HTML / NmtokensTest.php
blobbb64ff6e2bc85052b0d2566e659e250072cbb407
1 <?php
3 class HTMLPurifier_AttrDef_HTML_NmtokensTest extends HTMLPurifier_AttrDefHarness
6 function setUp() {
7 parent::setUp();
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');
35 // vim: et sw=4 sts=4