mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-10 17:26:25 +02:00
- AttrCollections does not barf when an inclusion is not present - HTMLDefinition configuration directives now use new syntax - Added %HTML.AllowedModules and %HTML.CoreModules for testing - Extend Harness so that it can accept a default configuration object member variable - Refactor modules to use Scaffolding, which defines some custom attributes that allows for the easy testing of attribute collections git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1082 48356398-32a2-884e-a903-53898d9a118a
42 lines
934 B
PHP
42 lines
934 B
PHP
<?php
|
|
|
|
require_once 'HTMLPurifier/HTMLModuleHarness.php';
|
|
|
|
class HTMLPurifier_HTMLModule_BdoTest extends HTMLPurifier_HTMLModuleHarness
|
|
{
|
|
|
|
function test() {
|
|
|
|
$this->setupScaffold('Bdo');
|
|
|
|
// max
|
|
$this->assertResult(
|
|
'<span>
|
|
<bdo ac:core="yes" dir="rtl">
|
|
#PCDATA <span>Inline</span>
|
|
</bdo>
|
|
</span>'
|
|
);
|
|
|
|
// min
|
|
$this->assertResult(
|
|
'<bdo></bdo>', '<bdo dir="ltr"></bdo>'
|
|
);
|
|
|
|
// children
|
|
$this->assertResult(
|
|
'<bdo dir="rtl">Text<span></span><div></div></bdo>',
|
|
'<bdo dir="rtl">Text<span></span></bdo>'
|
|
);
|
|
|
|
// global attr
|
|
$this->assertResult(
|
|
'<br dir="ltr" /><span dir="ltr"></span>',
|
|
'<br /><span dir="ltr"></span>'
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|