mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 17:01:51 +00:00
24c64dbbac
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@256 48356398-32a2-884e-a903-53898d9a118a
36 lines
908 B
PHP
36 lines
908 B
PHP
<?php
|
|
|
|
require_once 'HTMLPurifier/AttrTransform/BdoDir.php';
|
|
|
|
class HTMLPurifier_AttrTransform_BdoDirTest extends HTMLPurifier_AttrTransformHarness
|
|
{
|
|
|
|
function test() {
|
|
|
|
$this->transform = new HTMLPurifier_AttrTransform_BdoDir();
|
|
|
|
$inputs = array();
|
|
$expect = array();
|
|
$config = array();
|
|
|
|
// add dir
|
|
$inputs[0] = array();
|
|
$expect[0] = array('dir' => 'ltr');
|
|
|
|
// leave existing dir alone
|
|
$inputs[1] = array('dir' => 'rtl');
|
|
$expect[1] = array('dir' => 'rtl');
|
|
|
|
$config_rtl = HTMLPurifier_Config::createDefault();
|
|
$config_rtl->set('Attr', 'DefaultTextDir', 'rtl');
|
|
$inputs[2] = array();
|
|
$expect[2] = array('dir' => 'rtl');
|
|
$config[2] = $config_rtl;
|
|
|
|
$this->assertTransform($inputs, $expect, $config);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|