ContentEditableTest.php 671 B

123456789101112131415161718192021222324252627
  1. <?php
  2. class HTMLPurifier_AttrDef_HTML_ContentEditableTest extends HTMLPurifier_AttrDefHarness
  3. {
  4. public function setUp()
  5. {
  6. parent::setUp();
  7. $this->def = new HTMLPurifier_AttrDef_HTML_ContentEditable();
  8. }
  9. public function test()
  10. {
  11. $this->assertDef('', false);
  12. $this->assertDef('true', false);
  13. $this->assertDef('caret', false);
  14. $this->assertDef('false');
  15. }
  16. public function testTrustedHtml()
  17. {
  18. $this->config->set('HTML.Trusted', true);
  19. $this->assertDef('');
  20. $this->assertDef('true');
  21. $this->assertDef('false');
  22. $this->assertDef('caret', false);
  23. }
  24. }