You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
688B

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