Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
lithium
tests
cases
template
helper
FormTest
testFieldAssumeSelectIfList
lithium\tests\cases\template\helper\FormTest::testFieldAssumeSelectIfList PHP Method
FormTest Class Documentation
Show file
Open project: unionofrad/lithium
testFieldAssumeSelectIfList()
public
method
Tests that the
field()
method properly renders a
element if the 'list' option is passed. public testFieldAssumeSelectIfList ( ) public function testFieldAssumeSelectIfList() { $result = $this->form->field('colors', array('list' => array('r' => 'red', 'g' => 'green', 'b' => 'blue'))); $expected = array('<div', array('label' => array('for' => 'Colors')), 'Colors', '/label', 'select' => array('name' => 'colors', 'id' => 'Colors'), array('option' => array('value' => 'r')), 'red', '/option', array('option' => array('value' => 'g')), 'green', '/option', array('option' => array('value' => 'b')), 'blue', '/option', '/select', '/div'); $this->assertTags($result, $expected); } FormTest setUp tearDown testBindingByName testButton testCheckboxGeneration testCustomCheckbox testCustomInputTypes testCustomRadio testCustomValueCheckbox testCustomValueRadio testElementsWithDefaultConfiguration testErrorWithCustomConfiguration testFieldAssumeSelectIfList testFieldInputIdWithFormId testFieldLabelWithOptions testFieldTemplateOverride testFieldWithCustomType testFieldWithLabelShorthand testFormCreateWithMoreParams testFormCreateWithMoreParamsButSpecifiedAction testFormCreation testFormCreationMultipleBindings testFormCreationWithBinding testFormCreationWithNoContext testFormDataBinding testFormElementWithDefaultValue testFormErrorMultipleBindings testFormErrorWithRecordAndSpecificKey testFormErrorWithRecordAndSpecificKeyAndValue testFormErrorWithRecordAndStringError testFormErrorWithout testFormField testFormFieldCheckboxWithCustomConfig testFormFieldSelect testFormFieldWithCustomConfig testFormFieldWithCustomTemplate testFormFieldWithError testFormInputField testFormMultipleErrors testHiddenFieldWithId testHiddenFieldWithNoLabel testHiddenFieldWithValue testLabelGeneration testLabelGenerationWithNoEscape testLabelIdGeneration testMultiSelect testMultipleFields testMultiselected testNestedFieldAccess testNestedFieldError testPasswordWithBindingValue testRadioGeneration testRadioTypeFieldWithCustomTemplate testRecursiveSelect testRespondsTo testRestFormCreation testSelectGeneration testSelectTypeAgnosticism testSelectWithEmptyOption testSubmitGeneration testTemplateRemapping testTextBox testTextareaGeneration Top Functions | Top Classes | Documentation | Privacy Policy | Advertise with us PHP | C# (CSharp) | Java | Golang | C++ (Cpp) | Python | JavaScript | TypeScript EN | RU | DE | FR | ES | PT | IT | JP | ZH | KO