summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatt Farina <[email protected]>2013-06-11 21:57:02 -0400
committerMatt Farina <[email protected]>2013-06-11 21:57:02 -0400
commitc47852d4db90f8420510d780dd0c16411a68e8f3 (patch)
treea22e8d3ed39641d6cb2eacd380f43c4e8537ccac /test
parent7f1d9189bd12e808c5da236d32b89ddf3c7cc2d3 (diff)
Added SVG and MathML element and attribute normalization.
Diffstat (limited to 'test')
-rw-r--r--test/HTML5/ElementsTest.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/HTML5/ElementsTest.php b/test/HTML5/ElementsTest.php
index 6ac06bc..64db413 100644
--- a/test/HTML5/ElementsTest.php
+++ b/test/HTML5/ElementsTest.php
@@ -369,4 +369,46 @@ class ElementsTest extends TestCase {
}
+ public function testNormalizeSvgElement() {
+ $tests = array(
+ 'foo' => 'foo',
+ 'altglyph' => 'altGlyph',
+ 'BAR' => 'bar',
+ 'fespecularlighting' => 'feSpecularLighting',
+ 'bAz' => 'baz',
+ 'foreignobject' => 'foreignObject',
+ );
+
+ foreach ($tests as $input => $expected) {
+ $this->assertEquals($expected, Elements::normalizeSvgElement($input));
+ }
+ }
+
+ public function testNormalizeSvgAttribute() {
+ $tests = array(
+ 'foo' => 'foo',
+ 'attributename' => 'attributeName',
+ 'BAR' => 'bar',
+ 'limitingconeangle' => 'limitingConeAngle',
+ 'bAz' => 'baz',
+ 'patterncontentunits' => 'patternContentUnits',
+ );
+
+ foreach ($tests as $input => $expected) {
+ $this->assertEquals($expected, Elements::normalizeSvgAttribute($input));
+ }
+ }
+
+ public function testNormalizeMathMlAttribute() {
+ $tests = array(
+ 'foo' => 'foo',
+ 'definitionurl' => 'definitionURL',
+ 'BAR' => 'bar',
+ );
+
+ foreach ($tests as $input => $expected) {
+ $this->assertEquals($expected, Elements::normalizeMathMlAttribute($input));
+ }
+ }
+
}