diff options
-rw-r--r-- | test/HTML5/ParserTest.php | 24 | ||||
-rw-r--r-- | test/SimpleTest/HTML5/ParserTest.php | 15 |
2 files changed, 28 insertions, 11 deletions
diff --git a/test/HTML5/ParserTest.php b/test/HTML5/ParserTest.php index 43b87e9..7f36237 100644 --- a/test/HTML5/ParserTest.php +++ b/test/HTML5/ParserTest.php @@ -1,15 +1,17 @@ <?php +namespace HTML5\Tests; -require_once dirname(__FILE__) . '/../autorun.php'; +use \HTML5\Parser; -class HTML5_ParserTest extends UnitTestCase -{ - public function testParse() { - $result = HTML5_Parser::parse('<html><body></body></html>'); - $this->assertIsA($result, 'DOMDocument'); - } - public function testParseFragment() { - $result = HTML5_Parser::parseFragment('<b>asdf</b> foo'); - $this->assertIsA($result, 'DOMNodeList'); - } +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/SimpleTest/HTML5/ParserTest.php b/test/SimpleTest/HTML5/ParserTest.php new file mode 100644 index 0000000..43b87e9 --- /dev/null +++ b/test/SimpleTest/HTML5/ParserTest.php @@ -0,0 +1,15 @@ +<?php + +require_once dirname(__FILE__) . '/../autorun.php'; + +class HTML5_ParserTest extends UnitTestCase +{ + public function testParse() { + $result = HTML5_Parser::parse('<html><body></body></html>'); + $this->assertIsA($result, 'DOMDocument'); + } + public function testParseFragment() { + $result = HTML5_Parser::parseFragment('<b>asdf</b> foo'); + $this->assertIsA($result, 'DOMNodeList'); + } +} |