1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00
- Stray xmlns attributes removed from configuration documentation
. Interlinking in configuration documentation added using Injector_PurifierLinkify
. Directives now keep track of aliases to themselves

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1225 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-06-24 22:22:00 +00:00
parent b19fc32a5a
commit 58064592ff
12 changed files with 151 additions and 1 deletions

View File

@@ -0,0 +1,43 @@
<?php
require_once 'HTMLPurifier/InjectorHarness.php';
require_once 'HTMLPurifier/Injector/PurifierLinkify.php';
class HTMLPurifier_Injector_PurifierLinkifyTest extends HTMLPurifier_InjectorHarness
{
function setup() {
parent::setup();
$this->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',
'<a href="#Namespace.Directive">%Namespace.Directive</a>'
);
$this->assertResult(
'This %Namespace.Directive thing',
'This <a href="#Namespace.Directive">%Namespace.Directive</a> thing'
);
$this->assertResult(
'<div>This %Namespace.Directive thing</div>',
'<div>This <a href="#Namespace.Directive">%Namespace.Directive</a> thing</div>'
);
$this->assertResult(
'<a>%Namespace.Directive</a>'
);
}
}
?>

View File

@@ -83,6 +83,7 @@ $test_files[] = 'HTMLPurifier/HTMLModule/TidyTest.php';
$test_files[] = 'HTMLPurifier/IDAccumulatorTest.php';
$test_files[] = 'HTMLPurifier/Injector/AutoParagraphTest.php';
$test_files[] = 'HTMLPurifier/Injector/LinkifyTest.php';
$test_files[] = 'HTMLPurifier/Injector/PurifierLinkifyTest.php';
$test_files[] = 'HTMLPurifier/LanguageFactoryTest.php';
$test_files[] = 'HTMLPurifier/LanguageTest.php';
$test_files[] = 'HTMLPurifier/Lexer/DirectLexTest.php';