diff options
author | Matt Butcher <[email protected]> | 2013-04-09 17:32:29 -0500 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2013-04-09 17:32:29 -0500 |
commit | 35e00ed6d13a694e4f7db1024bf777757bc64bc1 (patch) | |
tree | 5803d76e7ad4bc61e92778c81183a25872665a12 /test/HTML5/ParserTest.php | |
parent | 7155b5adc2acf7691837a415d544f636b99a402a (diff) |
Updated ParserTest to use PHPUnit.
Diffstat (limited to 'test/HTML5/ParserTest.php')
-rw-r--r-- | test/HTML5/ParserTest.php | 24 |
1 files changed, 13 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); + } } |