2006-08-14 23:11:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once 'HTMLPurifier/AttrTransform/BdoDir.php';
|
2007-01-19 23:02:28 +00:00
|
|
|
require_once 'HTMLPurifier/AttrTransformHarness.php';
|
2006-08-14 23:11:28 +00:00
|
|
|
|
|
|
|
class HTMLPurifier_AttrTransform_BdoDirTest extends HTMLPurifier_AttrTransformHarness
|
|
|
|
{
|
|
|
|
|
2006-10-22 03:38:32 +00:00
|
|
|
function setUp() {
|
|
|
|
parent::setUp();
|
|
|
|
$this->obj = new HTMLPurifier_AttrTransform_BdoDir();
|
|
|
|
}
|
|
|
|
|
2006-08-14 23:11:28 +00:00
|
|
|
function test() {
|
|
|
|
|
2006-10-22 03:38:32 +00:00
|
|
|
$this->assertResult( array(), array('dir' => 'ltr') );
|
2006-08-14 23:11:28 +00:00
|
|
|
|
|
|
|
// leave existing dir alone
|
2006-10-22 03:38:32 +00:00
|
|
|
$this->assertResult( array('dir' => 'rtl') );
|
2006-08-14 23:11:28 +00:00
|
|
|
|
2006-10-22 03:38:32 +00:00
|
|
|
// use a different default
|
|
|
|
$this->assertResult(
|
|
|
|
array(),
|
|
|
|
array('dir' => 'rtl'),
|
|
|
|
array('Attr.DefaultTextDir' => 'rtl')
|
|
|
|
);
|
2006-08-14 23:11:28 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|