summaryrefslogtreecommitdiffstats
path: root/vendor/ezyang/htmlpurifier/tests/HTMLPurifier/AttrDef/CSS/FilterTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ezyang/htmlpurifier/tests/HTMLPurifier/AttrDef/CSS/FilterTest.php')
-rw-r--r--vendor/ezyang/htmlpurifier/tests/HTMLPurifier/AttrDef/CSS/FilterTest.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/ezyang/htmlpurifier/tests/HTMLPurifier/AttrDef/CSS/FilterTest.php b/vendor/ezyang/htmlpurifier/tests/HTMLPurifier/AttrDef/CSS/FilterTest.php
new file mode 100644
index 000000000..19b2d8d70
--- /dev/null
+++ b/vendor/ezyang/htmlpurifier/tests/HTMLPurifier/AttrDef/CSS/FilterTest.php
@@ -0,0 +1,29 @@
+<?php
+
+class HTMLPurifier_AttrDef_CSS_FilterTest extends HTMLPurifier_AttrDefHarness
+{
+
+ public function test()
+ {
+ $this->def = new HTMLPurifier_AttrDef_CSS_Filter();
+
+ $this->assertDef('none');
+
+ $this->assertDef('alpha(opacity=0)');
+ $this->assertDef('alpha(opacity=100)');
+ $this->assertDef('alpha(opacity=50)');
+ $this->assertDef('alpha(opacity=342)', 'alpha(opacity=100)');
+ $this->assertDef('alpha(opacity=-23)', 'alpha(opacity=0)');
+
+ $this->assertDef('alpha ( opacity = 0 )', 'alpha(opacity=0)');
+ $this->assertDef('alpha(opacity=0,opacity=100)', 'alpha(opacity=0)');
+
+ $this->assertDef('progid:DXImageTransform.Microsoft.Alpha(opacity=20)');
+
+ $this->assertDef('progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)', false);
+
+ }
+
+}
+
+// vim: et sw=4 sts=4