summaryrefslogtreecommitdiff
path: root/test/HTML5/ElementsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/HTML5/ElementsTest.php')
-rw-r--r--test/HTML5/ElementsTest.php19
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));
+ }
+
+}