public function testGetDisplayedDataForwardsCall() { $field = $this->createValidMockField('firstName'); $field->expects($this->atLeastOnce())->method('getDisplayedData')->will($this->returnValue('Bernhard')); $group = new FieldGroup('author'); $group->add($field); $this->assertEquals(array('firstName' => 'Bernhard'), $group->getDisplayedData()); }