diff options
author | Matt Butcher <[email protected]> | 2013-06-28 11:41:01 -0500 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2013-06-28 11:41:01 -0500 |
commit | a64d9eda45f78dba2872d4a84bf8c20c42b2fcf8 (patch) | |
tree | a74e64292b8a3e9e3e066f771af3362964d55344 /test/HTML5 | |
parent | 3e1d8b8d5512082a6dca175de15574f627722c3c (diff) | |
parent | 5081159654f0b1d9d66cb7f540dbe9b5bd4ae3aa (diff) |
Merge branch 'master' of github.com:Masterminds/html5-php
Diffstat (limited to 'test/HTML5')
-rw-r--r-- | test/HTML5/Html5Test.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/HTML5/Html5Test.php b/test/HTML5/Html5Test.php index 14fcb2d..844d7fc 100644 --- a/test/HTML5/Html5Test.php +++ b/test/HTML5/Html5Test.php @@ -166,4 +166,21 @@ class Html5Test extends TestCase { $this->assertRegExp('|<mi>y</mi>|',$html); } + public function testUnknownElements() { + + // The : should not have special handling accourding to section 2.9 of the + // spec. This is differenant than XML. Since we don't know these elements + // they are handled as normal elements. Note, to do this is really + // an invalid example and you should not embed prefixed xml in html5. + $dom = \HTML5::loadHTMLFragment("<f:rug> + <f:name>Big rectangle thing</f:name> + <f:width>40</f:width> + <f:length>80</f:length> + </f:rug>"); + + $this->assertEmpty($dom->errors); + $markup = \HTML5::saveHTML($dom); + $this->assertRegExp('|<f:name>Big rectangle thing</f:name>|',$markup); + } + } |