diff options
author | Matt Butcher <[email protected]> | 2014-02-11 09:56:01 -0700 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2014-02-11 09:56:01 -0700 |
commit | 44e8e23626bf619844baf9983e931d2f58606377 (patch) | |
tree | 62625f63a954ab5a3f9bb4184039a68496e3896a /test/HTML5/Html5Test.php | |
parent | 77ad931cd824feb33eebae08cf3a5a47bce1e337 (diff) | |
parent | 3b691837c6d7a0969137048fbda274463d6b1d7c (diff) |
Merge branch 'master' of github.com:Masterminds/html5-php
Diffstat (limited to 'test/HTML5/Html5Test.php')
-rw-r--r-- | test/HTML5/Html5Test.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/HTML5/Html5Test.php b/test/HTML5/Html5Test.php index 13f5b19..dcb51cd 100644 --- a/test/HTML5/Html5Test.php +++ b/test/HTML5/Html5Test.php @@ -26,6 +26,15 @@ class Html5Test extends TestCase { $dom = \HTML5::load(__DIR__ . '/Html5Test.html'); $this->assertInstanceOf('\DOMDocument', $dom); $this->assertEmpty($dom->errors); + + $file = fopen(__DIR__ . '/Html5Test.html', 'r'); + $dom = \HTML5::load($file); + $this->assertInstanceOf('\DOMDocument', $dom); + $this->assertEmpty($dom->errors); + + $dom = \HTML5::loadHTMLFile(__DIR__ . '/Html5Test.html'); + $this->assertInstanceOf('\DOMDocument', $dom); + $this->assertEmpty($dom->errors); } public function testLoadHTML() { @@ -125,7 +134,7 @@ class Html5Test extends TestCase { </body> </html>'); - $this->assertEmpty($dom->errors); + $this->assertEmpty($dom->errors, print_r($dom->errors, TRUE)); // Test a mixed case attribute. $list = $dom->getElementsByTagName('svg'); @@ -192,11 +201,13 @@ class Html5Test extends TestCase { <f:name>Big rectangle thing</f:name> <f:width>40</f:width> <f:length>80</f:length> - </f:rug>"); + </f:rug> + <sarcasm>um, yeah</sarcasm>"); $this->assertEmpty($dom->errors); $markup = \HTML5::saveHTML($dom); $this->assertRegExp('|<f:name>Big rectangle thing</f:name>|',$markup); + $this->assertRegExp('|<sarcasm>um, yeah</sarcasm>|',$markup); } public function testElements() { |