summaryrefslogtreecommitdiff
path: root/test/HTML5/Html5Test.php
diff options
context:
space:
mode:
authorMatt Farina <[email protected]>2013-06-26 16:45:34 -0400
committerMatt Farina <[email protected]>2013-06-26 16:45:34 -0400
commit206e34460fe8161a3e10eba8b75df291568a8b56 (patch)
tree2bd41aabdc865a9062012291f2629e848c268b2e /test/HTML5/Html5Test.php
parent3caf2aa846bc2bd6cec0d4442f5a4b486c6da29b (diff)
#8 Testing saving of fragments.
Diffstat (limited to 'test/HTML5/Html5Test.php')
-rw-r--r--test/HTML5/Html5Test.php8
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);