diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/HTML5/ElementsTest.php | 42 |
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)); + } + } + } |