From 8250662c81b3b850bf49c516835a2ac3f7b6a61f Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 24 Apr 2013 03:36:52 -0400 Subject: 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. --- test/HTML5/Serializer/TraverserTest.php | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'test/HTML5/Serializer') 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)); } } -- cgit v1.2.3