obj = new HTMLPurifier_Strategy_ValidateAttributes (); $this->config->set ( 'Attr.EnableID', true ); } public function testPreserveIDWhenEnabled() { $this->assertResult ( '
Preserve the ID.
' ); } public function testRemoveInvalidID() { $this->assertResult ( '
Kill the ID.
', '
Kill the ID.
' ); } public function testRemoveDuplicateID() { $this->assertResult ( '
Valid
Invalid
', '
Valid
Invalid
' ); } public function testAttributeKeyCaseInsensitivity() { $this->assertResult ( '
Convert ID to lowercase.
', '
Convert ID to lowercase.
' ); } public function testTrimWhitespace() { $this->assertResult ( '
Trim whitespace.
', '
Trim whitespace.
' ); } public function testIDBlacklist() { $this->config->set ( 'Attr.IDBlacklist', array ( 'invalid' ) ); $this->assertResult ( '
Invalid
', '
Invalid
' ); } public function testNameConvertedToID() { $this->config->set ( 'HTML.TidyLevel', 'heavy' ); $this->assertResult ( '', '' ); } } // vim: et sw=4 sts=4