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