2006-08-14 23:11:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class HTMLPurifier_AttrTransform_BdoDirTest extends HTMLPurifier_AttrTransformHarness
|
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-10-22 03:38:32 +00:00
|
|
|
function setUp() {
|
|
|
|
parent::setUp();
|
|
|
|
$this->obj = new HTMLPurifier_AttrTransform_BdoDir();
|
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-08-06 06:22:23 +00:00
|
|
|
function testAddDefaultDir() {
|
2006-10-22 03:38:32 +00:00
|
|
|
$this->assertResult( array(), array('dir' => 'ltr') );
|
2007-08-06 06:22:23 +00:00
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-08-06 06:22:23 +00:00
|
|
|
function testPreserveExistingDir() {
|
2006-10-22 03:38:32 +00:00
|
|
|
$this->assertResult( array('dir' => 'rtl') );
|
2007-08-06 06:22:23 +00:00
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-08-06 06:22:23 +00:00
|
|
|
function testAlternateDefault() {
|
2009-02-20 00:17:49 +00:00
|
|
|
$this->config->set('Attr.DefaultTextDir', 'rtl');
|
2006-10-22 03:38:32 +00:00
|
|
|
$this->assertResult(
|
|
|
|
array(),
|
2007-08-06 06:22:23 +00:00
|
|
|
array('dir' => 'rtl')
|
2006-10-22 03:38:32 +00:00
|
|
|
);
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-08-14 23:11:28 +00:00
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-08-14 23:11:28 +00:00
|
|
|
}
|
|
|
|
|
2008-12-06 09:24:59 +00:00
|
|
|
// vim: et sw=4 sts=4
|