summaryrefslogtreecommitdiff
path: root/test/HTML5/Html5Test.php
diff options
context:
space:
mode:
authorMatt Farina <[email protected]>2013-06-26 09:19:16 -0400
committerMatt Farina <[email protected]>2013-06-26 09:19:16 -0400
commitb73ec8ad9becdadf091ddc1fbcc8cdcfde509abe (patch)
tree040543a0efdb5acf4dd33399698bee88691d6a9c /test/HTML5/Html5Test.php
parente1978e35fc16007620866de2713f05d0dbefb470 (diff)
Added a helper method of loadHTMLFragment to get a DOMDocumentFragment.
Diffstat (limited to 'test/HTML5/Html5Test.php')
-rw-r--r--test/HTML5/Html5Test.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/HTML5/Html5Test.php b/test/HTML5/Html5Test.php
index 442fe63..e122509 100644
--- a/test/HTML5/Html5Test.php
+++ b/test/HTML5/Html5Test.php
@@ -18,6 +18,13 @@ class Html5Test extends TestCase {
$this->assertEmpty($dom->errors);
}
+ public function testLoadHTMLFragment() {
+ $fragment = '<section id="Foo"><div class="Bar">Baz</div></section>';
+ $dom = \HTML5::loadHTMLFragment($fragment);
+ $this->assertInstanceOf('\DOMDocumentFragment', $dom);
+ $this->assertEmpty($dom->errors);
+ }
+
public function testSaveHTML() {
$dom = \HTML5::load(__DIR__ . '/Html5Test.html');
$this->assertInstanceOf('\DOMDocument', $dom);