mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +02:00
[3.0.0]
+ PHP4 reference/foreach cruft in Injector removed . Unit tests for Injector improved . Some todo stuff updated git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1462 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -26,6 +26,19 @@ class HTMLPurifier_Strategy_MakeWellFormed_InjectorTest extends HTMLPurifier_Str
|
||||
$this->assertResult('<i><b>asdf</b>', '<i><b>asdf</b></i>');
|
||||
}
|
||||
|
||||
function testErrorRequiredElementNotAllowed() {
|
||||
$this->config->set('HTML', 'Allowed', '');
|
||||
$this->expectError('Cannot enable AutoParagraph injector because p is not allowed');
|
||||
$this->expectError('Cannot enable Linkify injector because a is not allowed');
|
||||
$this->assertResult('Foobar');
|
||||
}
|
||||
|
||||
function testErrorRequiredAttributeNotAllowed() {
|
||||
$this->config->set('HTML', 'Allowed', 'a,p');
|
||||
$this->expectError('Cannot enable Linkify injector because a.href is not allowed');
|
||||
$this->assertResult('<p>http://example.com</p>');
|
||||
}
|
||||
|
||||
function testOnlyAutoParagraph() {
|
||||
$this->assertResult(
|
||||
'Foobar',
|
||||
|
Reference in New Issue
Block a user