[Form] Fixed testBindSingleExpanded (was testing multiple, non-expanded)
This commit is contained in:
parent
e52cf7afe0
commit
b3648b219b
@ -263,15 +263,25 @@ EOF;
|
|||||||
public function testBindSingleExpanded()
|
public function testBindSingleExpanded()
|
||||||
{
|
{
|
||||||
$field = new ChoiceField('name', array(
|
$field = new ChoiceField('name', array(
|
||||||
'multiple' => true,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => true,
|
||||||
'choices' => $this->choices,
|
'choices' => $this->choices,
|
||||||
));
|
));
|
||||||
|
|
||||||
$field->bind('b');
|
$field->bind('b');
|
||||||
|
|
||||||
$this->assertEquals('b', $field->getData());
|
$this->assertSame('b', $field->getData());
|
||||||
$this->assertEquals('b', $field->getDisplayedData());
|
$this->assertSame(null, $field['a']->getData());
|
||||||
|
$this->assertSame(true, $field['b']->getData());
|
||||||
|
$this->assertSame(null, $field['c']->getData());
|
||||||
|
$this->assertSame(null, $field['d']->getData());
|
||||||
|
$this->assertSame(null, $field['e']->getData());
|
||||||
|
$this->assertSame('', $field['a']->getDisplayedData());
|
||||||
|
$this->assertSame('1', $field['b']->getDisplayedData());
|
||||||
|
$this->assertSame('', $field['c']->getDisplayedData());
|
||||||
|
$this->assertSame('', $field['d']->getDisplayedData());
|
||||||
|
$this->assertSame('', $field['e']->getDisplayedData());
|
||||||
|
$this->assertSame(array('a' => '', 'b' => '1', 'c' => '', 'd' => '', 'e' => ''), $field->getDisplayedData());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testBindSingleExpandedNumericChoices()
|
public function testBindSingleExpandedNumericChoices()
|
||||||
|
Reference in New Issue
Block a user