BdoDirTest.php 644 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. class HTMLPurifier_AttrTransform_BdoDirTest extends HTMLPurifier_AttrTransformHarness
  3. {
  4. function setUp() {
  5. parent::setUp();
  6. $this->obj = new HTMLPurifier_AttrTransform_BdoDir();
  7. }
  8. function testAddDefaultDir() {
  9. $this->assertResult( array(), array('dir' => 'ltr') );
  10. }
  11. function testPreserveExistingDir() {
  12. $this->assertResult( array('dir' => 'rtl') );
  13. }
  14. function testAlternateDefault() {
  15. $this->config->set('Attr.DefaultTextDir', 'rtl');
  16. $this->assertResult(
  17. array(),
  18. array('dir' => 'rtl')
  19. );
  20. }
  21. }
  22. // vim: et sw=4 sts=4