FrameTargetTest.php 685 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. class HTMLPurifier_AttrDef_HTML_FrameTargetTest extends HTMLPurifier_AttrDefHarness
  3. {
  4. function setup() {
  5. parent::setup();
  6. $this->def = new HTMLPurifier_AttrDef_HTML_FrameTarget();
  7. }
  8. function testNoneAllowed() {
  9. $this->assertDef('', false);
  10. $this->assertDef('foo', false);
  11. $this->assertDef('_blank', false);
  12. $this->assertDef('baz', false);
  13. }
  14. function test() {
  15. $this->config->set('Attr.AllowedFrameTargets', 'foo,_blank');
  16. $this->assertDef('', false);
  17. $this->assertDef('foo');
  18. $this->assertDef('_blank');
  19. $this->assertDef('baz', false);
  20. }
  21. }
  22. // vim: et sw=4 sts=4