Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update test case for disabled radio buttons (allow boolean value)

  • Loading branch information...
commit d6b9b48d4a705c1df848daf833cc9effd48410e3 1 parent 7dfe727
@ingk ingk authored
Showing with 22 additions and 0 deletions.
  1. +22 −0 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
View
22 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
@@ -3344,6 +3344,28 @@ public function testRadioDisabled() {
'/fieldset'
);
$this->assertTags($result, $expected);
+
+ $result = $this->Form->radio(
+ 'Model.field',
+ array('option A', 'option B'),
+ array('disabled' => true, 'value' => 'option A')
+ );
+ $expected = array(
+ 'fieldset' => array(),
+ 'legend' => array(),
+ 'Field',
+ '/legend',
+ array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField0', 'disabled' => 'disabled', 'checked' => 'checked')),
+ array('label' => array('for' => 'ModelField0')),
+ 'option A',
+ '/label',
+ array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField1', 'disabled' => 'disabled')),
+ array('label' => array('for' => 'ModelField1')),
+ 'option B',
+ '/label',
+ '/fieldset'
+ );
+ $this->assertTags($result, $expected);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.