ObjectTest.php 998 B

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