summaryrefslogtreecommitdiff
path: root/library/ezyang/htmlpurifier/tests/HTMLPurifier/HTMLModule/ObjectTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/ezyang/htmlpurifier/tests/HTMLPurifier/HTMLModule/ObjectTest.php')
-rw-r--r--library/ezyang/htmlpurifier/tests/HTMLPurifier/HTMLModule/ObjectTest.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/library/ezyang/htmlpurifier/tests/HTMLPurifier/HTMLModule/ObjectTest.php b/library/ezyang/htmlpurifier/tests/HTMLPurifier/HTMLModule/ObjectTest.php
new file mode 100644
index 0000000000..97ecaab342
--- /dev/null
+++ b/library/ezyang/htmlpurifier/tests/HTMLPurifier/HTMLModule/ObjectTest.php
@@ -0,0 +1,42 @@
+<?php
+
+class HTMLPurifier_HTMLModule_ObjectTest extends HTMLPurifier_HTMLModuleHarness
+{
+
+ public function setUp()
+ {
+ parent::setUp();
+ $this->config->set('HTML.Trusted', true);
+ }
+
+ public function testDefaultRemoval()
+ {
+ $this->config->set('HTML.Trusted', false);
+ $this->assertResult(
+ '<object></object>', ''
+ );
+ }
+
+ public function testMinimal()
+ {
+ $this->assertResult('<object></object>');
+ }
+
+ public function testStandardUseCase()
+ {
+ $this->assertResult(
+'<object type="video/x-ms-wmv" data="http://domain.com/video.wmv" width="320" height="256">
+<param name="src" value="http://domain.com/video.wmv" />
+<param name="autostart" value="false" />
+<param name="controller" value="true" />
+<param name="pluginurl" value="http://www.microsoft.com/Windows/MediaPlayer/" />
+<a href="http://www.microsoft.com/Windows/MediaPlayer/">Windows Media player required</a>
+</object>'
+ );
+ }
+
+ // more test-cases?
+
+}
+
+// vim: et sw=4 sts=4