diff options
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); |