diff options
author | Matt Farina <[email protected]> | 2013-04-24 03:36:52 -0400 |
---|---|---|
committer | Matt Farina <[email protected]> | 2013-04-24 03:36:52 -0400 |
commit | 8250662c81b3b850bf49c516835a2ac3f7b6a61f (patch) | |
tree | 80d9e8635bd781cce5b86c922c3733628b886565 /test/HTML5/Serializer/TraverserTest.php | |
parent | b799bebf89842830ffedbdd109014b224a74800f (diff) |
Moved back to array lookups for html5 elements. This is SIGNIFICANTLY faster then the regular expressions and twice as fast as the next fastest method I tested.
Diffstat (limited to 'test/HTML5/Serializer/TraverserTest.php')
-rw-r--r-- | test/HTML5/Serializer/TraverserTest.php | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/test/HTML5/Serializer/TraverserTest.php b/test/HTML5/Serializer/TraverserTest.php index 059b314..665f318 100644 --- a/test/HTML5/Serializer/TraverserTest.php +++ b/test/HTML5/Serializer/TraverserTest.php @@ -37,17 +37,11 @@ class TraverserTest extends \HTML5\Tests\TestCase { foreach ($blocks as $block) { $this->assertTrue($method->invoke($t, $block), 'Block test failed on: ' . $block); - - // Also test the uppercase version. - $this->assertTrue($method->invoke($t, strtoupper($block)), 'Block test failed on: ' . strtoupper($block)); } $nonblocks = array('span', 'a', 'img'); foreach ($nonblocks as $tag) { $this->assertFalse($method->invoke($t, $tag), 'Block test failed on: ' . $tag); - - // Also test the uppercase version. - $this->assertFalse($method->invoke($t, strtoupper($tag)), 'Block test failed on: ' . strtoupper($tag)); } } @@ -62,17 +56,11 @@ class TraverserTest extends \HTML5\Tests\TestCase { foreach ($elements as $element) { $this->assertTrue($method->invoke($t, $element), 'Unary test failed on: ' . $element); - - // Also test the uppercase version. - $this->assertTrue($method->invoke($t, strtoupper($element)), 'Unary test failed on: ' . strtoupper($element)); } $nonblocks = array('span', 'a', 'div'); foreach ($nonblocks as $tag) { $this->assertFalse($method->invoke($t, $tag), 'Unary test failed on: ' . $tag); - - // Also test the uppercase version. - $this->assertFalse($method->invoke($t, strtoupper($tag)), 'Unary test failed on: ' . strtoupper($tag)); } } |