3 class HTMLPurifier_Injector_LinkifyTest
extends HTMLPurifier_InjectorHarness
8 $this->config
->set('AutoFormat.Linkify', true);
11 function testLinkifyURLInRootNode() {
14 '<a href="http://example.com">http://example.com</a>'
18 function testLinkifyURLInInlineNode() {
20 '<b>http://example.com</b>',
21 '<b><a href="http://example.com">http://example.com</a></b>'
25 function testBasicUsageCase() {
27 'This URL http://example.com is what you need',
28 'This URL <a href="http://example.com">http://example.com</a> is what you need'
32 function testIgnoreURLInATag() {
34 '<a>http://example.com/</a>'
38 function testNeeded() {
39 $this->config
->set('HTML.Allowed', 'b');
40 $this->expectError('Cannot enable Linkify injector because a is not allowed');
41 $this->assertResult('http://example.com/');