|
@@ 844-857 (lines=14) @@
|
| 841 |
|
* |
| 842 |
|
* @covers Grunion_Contact_Form_Field |
| 843 |
|
*/ |
| 844 |
|
public function test_make_sure_radio_field_renders_as_expected() { |
| 845 |
|
$attributes = array( |
| 846 |
|
'label' => 'fun', |
| 847 |
|
'type' => 'radio', |
| 848 |
|
'class' => 'lalala', |
| 849 |
|
'default' => 'option 1', |
| 850 |
|
'id' => 'funID', |
| 851 |
|
'options' => array( 'option 1', 'option 2', 'option 3, or 4', 'back\\slash' ), |
| 852 |
|
'values' => array( 'option 1', 'option 2', 'option [34]', '\\' ), |
| 853 |
|
); |
| 854 |
|
|
| 855 |
|
$expected_attributes = array_merge( $attributes, array( 'input_type' => 'radio' ) ); |
| 856 |
|
$this->assertValidFieldMultiField( $this->render_field( $attributes ), $expected_attributes ); |
| 857 |
|
} |
| 858 |
|
|
| 859 |
|
/** |
| 860 |
|
* Test for select field_renders |
|
@@ 864-877 (lines=14) @@
|
| 861 |
|
* |
| 862 |
|
* @covers Grunion_Contact_Form_Field |
| 863 |
|
*/ |
| 864 |
|
public function test_make_sure_select_field_renders_as_expected() { |
| 865 |
|
$attributes = array( |
| 866 |
|
'label' => 'fun', |
| 867 |
|
'type' => 'select', |
| 868 |
|
'class' => 'lalala', |
| 869 |
|
'default' => 'option 1', |
| 870 |
|
'id' => 'funID', |
| 871 |
|
'options' => array( 'option 1', 'option 2', 'option 3, or 4', 'back\\slash' ), |
| 872 |
|
'values' => array( 'option 1', 'option 2', 'option [34]', '\\' ), |
| 873 |
|
); |
| 874 |
|
|
| 875 |
|
$expected_attributes = array_merge( $attributes, array( 'input_type' => 'select' ) ); |
| 876 |
|
$this->assertValidFieldMultiField( $this->render_field( $attributes ), $expected_attributes ); |
| 877 |
|
} |
| 878 |
|
|
| 879 |
|
/** |
| 880 |
|
* Renders a Grunion_Contact_Form_Field. |