From 466aabedbdb67c02aabbb8408aac8841147c0ff0 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Tue, 15 Dec 2015 16:53:33 +1000 Subject: [PATCH] Add test for select optgroups --- tests/FormBuilderTest.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/FormBuilderTest.php b/tests/FormBuilderTest.php index 9ee220c..50f326f 100644 --- a/tests/FormBuilderTest.php +++ b/tests/FormBuilderTest.php @@ -267,6 +267,27 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase ['name' => 'select-name'] ); $this->assertEquals($select, ''); + + $select = $this->formBuilder->select( + 'size', + [ + 'Large sizes' => [ + 'L' => 'Large', + 'XL' => 'Extra Large', + ], + 'S' => 'Small', + ], + null, + [ + 'class' => 'class-name', + 'id' => 'select-id', + ] + ); + + $this->assertEquals( + $select, + '' + ); } public function testFormSelectRepopulation()