diff options
author | Technosophos <[email protected]> | 2013-04-24 16:16:38 -0500 |
---|---|---|
committer | Technosophos <[email protected]> | 2013-04-24 16:16:38 -0500 |
commit | 908039dbc19decf0f897867b1add614acbcf9352 (patch) | |
tree | 21eb41d01bce08012a29fbaf686577905443f7f0 /test | |
parent | 608bb4ba191cf3b40c29b28347c2a75e7c043246 (diff) |
Experimenting with bitmasked elements.
Diffstat (limited to 'test')
-rw-r--r-- | test/HTML5/ElementsTest.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/HTML5/ElementsTest.php b/test/HTML5/ElementsTest.php index 20161bb..7fe6af8 100644 --- a/test/HTML5/ElementsTest.php +++ b/test/HTML5/ElementsTest.php @@ -322,4 +322,20 @@ 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->assertTrue(Elements::isA('script', Elements::TEXT_RAW)); + $this->assertFalse(Elements::isA('script', Elements::TEXT_RCDATA)); + } + +} |