3 require_once 'HTMLPurifier/InjectorHarness.php';
4 require_once 'HTMLPurifier/Injector/PurifierLinkify.php';
6 class HTMLPurifier_Injector_PurifierLinkifyTest
extends HTMLPurifier_InjectorHarness
11 $this->config
= array(
12 'AutoFormat.PurifierLinkify' => true,
13 'AutoFormatParam.PurifierLinkifyDocURL' => '#%s'
17 function testLinkify() {
19 $this->assertResult('Foobar');
20 $this->assertResult('20% off!');
21 $this->assertResult('%Core namespace (not recognized)');
23 '%Namespace.Directive',
24 '<a href="#Namespace.Directive">%Namespace.Directive</a>'
27 'This %Namespace.Directive thing',
28 'This <a href="#Namespace.Directive">%Namespace.Directive</a> thing'
31 '<div>This %Namespace.Directive thing</div>',
32 '<div>This <a href="#Namespace.Directive">%Namespace.Directive</a> thing</div>'
35 '<a>%Namespace.Directive</a>'