config = array( 'AutoFormat.PurifierLinkify' => true, 'AutoFormatParam.PurifierLinkifyDocURL' => '#%s' ); } function testLinkify() { $this->assertResult('Foobar'); $this->assertResult('20% off!'); $this->assertResult('%Core namespace (not recognized)'); $this->assertResult( '%Namespace.Directive', '%Namespace.Directive' ); $this->assertResult( 'This %Namespace.Directive thing', 'This %Namespace.Directive thing' ); $this->assertResult( '
This %Namespace.Directive thing
', '
This %Namespace.Directive thing
' ); $this->assertResult( '%Namespace.Directive' ); } function testNeeded() { $this->expectError('Cannot enable PurifierLinkify injector because a is not allowed'); $this->assertResult('%Namespace.Directive', true, array('AutoFormat.PurifierLinkify' => true, 'HTML.Allowed' => 'b')); } }