Beispiel #1
0
 /**
  * {@inheritDoc}
  */
 public function getDisplayedData()
 {
     if ($this->mode === self::FORM) {
         return parent::getDisplayedData();
     }
     return Field::getDisplayedData();
 }
 public function testGetDisplayedDataForwardsCall()
 {
     $field = $this->createValidMockField('firstName');
     $field->expects($this->atLeastOnce())->method('getDisplayedData')->will($this->returnValue('Bernhard'));
     $form = new Form('author');
     $form->add($field);
     $this->assertEquals(array('firstName' => 'Bernhard'), $form->getDisplayedData());
 }