diff options
author | Matt Butcher <[email protected]> | 2013-04-24 20:09:02 -0500 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2013-04-24 20:09:02 -0500 |
commit | 6815b2bd3a08201f6a75f09f7e24b50c5d3aeab2 (patch) | |
tree | fb547ecaeac2add94e6174dab62158791bff8dcb /test/HTML5/ElementsTest.php | |
parent | 36d1367a7e365e1f3a4d63161999970799257e42 (diff) | |
parent | fe3d7b815756b6f9ec3bad7c9bfe400b6ea11222 (diff) |
Merge branch 'master' of github.com:technosophos/HTML5-PHP
Diffstat (limited to 'test/HTML5/ElementsTest.php')
-rw-r--r-- | test/HTML5/ElementsTest.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/HTML5/ElementsTest.php b/test/HTML5/ElementsTest.php index 20161bb..69d0675 100644 --- a/test/HTML5/ElementsTest.php +++ b/test/HTML5/ElementsTest.php @@ -322,4 +322,21 @@ class ElementsTest extends TestCase { } } -}
\ No newline at end of file + public function testElement() { + foreach ($this->html5Elements as $element) { + $this->assertGreaterThan(0, Elements::element($element)); + } + $nonhtml5 = array('foo', 'bar', 'baz'); + foreach ($nonhtml5 as $element) { + $this->assertFalse(Elements::element($element)); + } + } + + public function testIsA() { + $this->assertTrue(Elements::isA('script', Elements::KNOWN_ELEMENT)); + $this->assertFalse(Elements::isA('scriptypoo', Elements::KNOWN_ELEMENT)); + $this->assertTrue(Elements::isA('script', Elements::TEXT_RAW)); + $this->assertFalse(Elements::isA('script', Elements::TEXT_RCDATA)); + } + +} |