From 0d89c22d28c4c5ef75a04874b1451c25c125820b Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Thu, 22 Sep 2016 12:33:58 +0200 Subject: removed loop and renamed test --- test/HTML5/Parser/TreeBuildingRulesTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/HTML5/Parser/TreeBuildingRulesTest.php b/test/HTML5/Parser/TreeBuildingRulesTest.php index 59d65a2..de94d06 100644 --- a/test/HTML5/Parser/TreeBuildingRulesTest.php +++ b/test/HTML5/Parser/TreeBuildingRulesTest.php @@ -90,17 +90,17 @@ class TreeBuildingRulesTest extends \Masterminds\HTML5\Tests\TestCase $this->assertEquals('dd', $list->lastChild->tagName); } - public function testHandleOption() + public function testHandleOptionGroupAndOption() { - $html = sprintf(self::HTML_STUB, ''); + $html = sprintf(self::HTML_STUB, ''); $doc = $this->parse($html); $list = $doc->getElementById('foo'); $this->assertEquals(1, $list->childNodes->length); - foreach ($list->childNodes as $ele) { - $this->assertEquals('option', $ele->tagName); - } + + $option = $list->childNodes->item(0); + $this->assertEquals('option', $option->tagName); } public function testTable() -- cgit v1.2.3