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.

43 lines
1.0KB

  1. <?php
  2. class HTMLPurifier_HTMLModule_ObjectTest extends HTMLPurifier_HTMLModuleHarness
  3. {
  4. public function setUp()
  5. {
  6. parent::setUp();
  7. $this->config->set('HTML.Trusted', true);
  8. }
  9. public function testDefaultRemoval()
  10. {
  11. $this->config->set('HTML.Trusted', false);
  12. $this->assertResult(
  13. '<object></object>', ''
  14. );
  15. }
  16. public function testMinimal()
  17. {
  18. $this->assertResult('<object></object>');
  19. }
  20. public function testStandardUseCase()
  21. {
  22. $this->assertResult(
  23. '<object type="video/x-ms-wmv" data="http://domain.com/video.wmv" width="320" height="256">
  24. <param name="src" value="http://domain.com/video.wmv" />
  25. <param name="autostart" value="false" />
  26. <param name="controller" value="true" />
  27. <param name="pluginurl" value="http://www.microsoft.com/Windows/MediaPlayer/" />
  28. <a href="http://www.microsoft.com/Windows/MediaPlayer/">Windows Media player required</a>
  29. </object>'
  30. );
  31. }
  32. // more test-cases?
  33. }
  34. // vim: et sw=4 sts=4