From 0b659d513e73f757f150cdf863dfebcedb634111 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 23 Jan 2013 21:19:37 -0500 Subject: [PATCH] Add tests for #3545 Fix included in GH-1075 Closes #3545 --- lib/Cake/Test/Case/View/Helper/FormHelperTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index ae5b8fc91..bb156ae9a 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -3786,6 +3786,17 @@ class FormHelperTest extends CakeTestCase { '/select' ); $this->assertTags($result, $expected); + + $this->Form->request->data['Model']['field'] = 50; + $result = $this->Form->select('Model.field', array('50f5c0cf' => 'Stringy', '50' => 'fifty')); + $expected = array( + 'select' => array('name' => 'data[Model][field]', 'id' => 'ModelField'), + array('option' => array('value' => '')), '/option', + array('option' => array('value' => '50f5c0cf')), 'Stringy', '/option', + array('option' => array('value' => '50', 'selected' => 'selected')), 'fifty', '/option', + '/select' + ); + $this->assertTags($result, $expected); } /**