diff options
author | Matt Butcher <[email protected]> | 2013-06-27 16:02:50 -0500 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2013-06-27 16:02:50 -0500 |
commit | 5921b94e0a6b5c1abb3ecf6a25e2292bca68a58b (patch) | |
tree | 345ca68190ac611b909dd3a8881abc5f52d4eca7 /test/HTML5/Html5Test.php | |
parent | d57b7408f1c6a7bdafd63b24b2fd248e959e294f (diff) | |
parent | 206e34460fe8161a3e10eba8b75df291568a8b56 (diff) |
Merge branch 'master' of github.com:Masterminds/html5-php
Diffstat (limited to 'test/HTML5/Html5Test.php')
-rw-r--r-- | test/HTML5/Html5Test.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/HTML5/Html5Test.php b/test/HTML5/Html5Test.php index e122509..14fcb2d 100644 --- a/test/HTML5/Html5Test.php +++ b/test/HTML5/Html5Test.php @@ -34,6 +34,14 @@ class Html5Test extends TestCase { $this->assertRegExp('|<p>This is a test.</p>|', $saved); } + public function testSaveHTMLFragment() { + $fragment = '<section id="Foo"><div class="Bar">Baz</div></section>'; + $dom = \HTML5::loadHTMLFragment($fragment); + + $string = \HTML5::saveHTML($dom); + $this->assertEquals($fragment, $string); + } + public function testSave() { $dom = \HTML5::load(__DIR__ . '/Html5Test.html'); $this->assertInstanceOf('\DOMDocument', $dom); |