From 81c9ee7a7bc94437247826d2b61acfd5074cbb0b Mon Sep 17 00:00:00 2001 From: lanort Date: Thu, 3 Mar 2016 10:13:57 +0100 Subject: [PATCH] FormBuilderTest: testSelect: added test for '0'-key option Added assertion for the case, that the options for the select field contain a zero key, eg `['0' => 'All Sizes', 'L' => 'Large']` See also commit: https://github.com/LaravelCollective/html/pull/127/commits --- tests/FormBuilderTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/FormBuilderTest.php b/tests/FormBuilderTest.php index ee8ac49..eaa6fdc 100644 --- a/tests/FormBuilderTest.php +++ b/tests/FormBuilderTest.php @@ -260,6 +260,16 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase ); $this->assertEquals($select, ''); + + $select = $this->formBuilder->select( + 'size', + ['0' => 'All Sizes', 'L' => 'Large', 'M' => 'Medium', 'S' => 'Small'], + ['M'], + ['multiple'] + ); + $this->assertEquals( + $select, + ''); $select = $this->formBuilder->select( 'size',