From 4ac18627abe1d60f0a675914cb91eec2b8f4bcb8 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 15 May 2013 13:57:25 -0400 Subject: Updated the \HTML5 class to parse with static methods, updated the Traverser tests to work with the the new parser, and remoted the old Parser tests not that the old parser is gone. --- test/HTML5/ParserTest.php | 17 ----------------- test/HTML5/Serializer/TraverserTest.php | 6 +++--- 2 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 test/HTML5/ParserTest.php (limited to 'test/HTML5') diff --git a/test/HTML5/ParserTest.php b/test/HTML5/ParserTest.php deleted file mode 100644 index 7f36237..0000000 --- a/test/HTML5/ParserTest.php +++ /dev/null @@ -1,17 +0,0 @@ -'); - $this->assertTrue($result instanceof \DOMDocument); - } - public function testParseFragment() { - $result = Parser::parseFragment('asdf foo'); - $this->assertTrue($result instanceof \DOMNodeList); - } -} diff --git a/test/HTML5/Serializer/TraverserTest.php b/test/HTML5/Serializer/TraverserTest.php index 83302f0..1a17af3 100644 --- a/test/HTML5/Serializer/TraverserTest.php +++ b/test/HTML5/Serializer/TraverserTest.php @@ -39,7 +39,7 @@ class TraverserTest extends \HTML5\Tests\TestCase { function getTraverser() { $stream = fopen('php://temp', 'w'); - $dom = \HTML5::parse($this->markup); + $dom = \HTML5::loadHTML($this->markup); $t = new Traverser($dom, $stream); // We return both the traverser and stream so we can pull from it. @@ -52,7 +52,7 @@ class TraverserTest extends \HTML5\Tests\TestCase { // use a stream in temp space. $stream = fopen('php://temp', 'w'); - $dom = \HTML5::parse($this->markup); + $dom = \HTML5::loadHTML($this->markup); $t = new Traverser($dom, $stream); @@ -76,7 +76,7 @@ class TraverserTest extends \HTML5\Tests\TestCase { } function testText() { - $dom = \HTML5::parse(' + $dom = \HTML5::loadHTML(' -- cgit v1.2.3