summaryrefslogtreecommitdiff
path: root/test/HTML5
diff options
context:
space:
mode:
authorMatt Farina <[email protected]>2013-05-15 13:57:25 -0400
committerMatt Farina <[email protected]>2013-05-15 13:57:25 -0400
commit4ac18627abe1d60f0a675914cb91eec2b8f4bcb8 (patch)
tree5ad5770d9593836bd84abad3f8a198505ea526c5 /test/HTML5
parent0cdf4ae1aaf6aefdc7218dbb49e543e8603035a8 (diff)
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.
Diffstat (limited to 'test/HTML5')
-rw-r--r--test/HTML5/ParserTest.php17
-rw-r--r--test/HTML5/Serializer/TraverserTest.php6
2 files changed, 3 insertions, 20 deletions
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 @@
-<?php
-namespace HTML5\Tests;
-
-use \HTML5\Parser;
-
-require_once 'TestCase.php';
-
-class ParserTest extends TestCase {
- public function testParse() {
- $result = Parser::parse('<html><body></body></html>');
- $this->assertTrue($result instanceof \DOMDocument);
- }
- public function testParseFragment() {
- $result = Parser::parseFragment('<b>asdf</b> 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('<!doctype html>
+ $dom = \HTML5::loadHTML('<!doctype html>
<html lang="en">
<head>
<script>baz();</script>