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.

32 lines
718B

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