diff options
author | Technosophos <[email protected]> | 2013-04-02 16:44:02 -0500 |
---|---|---|
committer | Technosophos <[email protected]> | 2013-04-02 16:44:02 -0500 |
commit | 8a5d21165697440ae80756d9b8acf56dd682d0fc (patch) | |
tree | 27305660f874c168308418fe3a7d6bf0c3aa3de6 /test/HTML5/TestDataTest.php | |
parent | 91d1684acf50e0f6b58c877765ab9863e650a33a (diff) |
Initial add of html5lib.
Diffstat (limited to 'test/HTML5/TestDataTest.php')
-rw-r--r-- | test/HTML5/TestDataTest.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/HTML5/TestDataTest.php b/test/HTML5/TestDataTest.php new file mode 100644 index 0000000..de97040 --- /dev/null +++ b/test/HTML5/TestDataTest.php @@ -0,0 +1,31 @@ +<?php + +require_once dirname(__FILE__) . '/../autorun.php'; + +class HTML5_TestDataTest extends UnitTestCase +{ + function testSample() { + $data = new HTML5_TestData(dirname(__FILE__) . '/TestDataTest/sample.dat'); + $this->assertIdentical($data->tests, array( + array('data' => "Foo", 'des' => "Bar"), + array('data' => "Foo") + )); + } + function testStrDom() { + $dom = new DOMDocument(); + $dom->loadHTML('<!DOCTYPE html PUBLIC "http://foo" "http://bar"><html><body foo="bar" baz="1">foo<b>bar</b>asdf</body></html>'); + $this->assertIdentical(HTML5_TestData::strDom($dom), <<<RESULT +| <!DOCTYPE html "http://foo" "http://bar"> +| <html> +| <body> +| baz="1" +| foo="bar" +| "foo" +| <b> +| "bar" +| "asdf" +RESULT +); + } +} + |