public function testGetMultiSelectedValue() { $FormConfig = getProperty('MailForm', 'FormConfig'); $mailform = new MailForm(); $this->assertEquals('', $mailform->getMultiSelectedValue('key')); $selectValues = array('empty' => 'empty', '1' => 'option1', '2' => 'option2'); $FormConfig->setValue($mailform, array('items' => array('key' => array('selectvalues' => $selectValues)))); $this->assertEquals('', $mailform->getMultiSelectedValue('key')); $mailform = $this->getMockBuilder('MailForm')->setMethods(array('getValue'))->getMock(); $mailform->expects($this->once())->method('getValue')->with('key')->will($this->returnValue(array('1', '2'))); $FormConfig->setValue($mailform, array('items' => array('key' => array('selectvalues' => $selectValues)))); $this->assertEquals('option1/option2', $mailform->getMultiSelectedValue('key')); }