protected function getField($isEmpty) { $field = new Field(array('fieldDefIdentifier' => 'testfield', 'value' => null)); $this->fieldHelperMock->expects($this->once())->method('isFieldEmpty')->will($this->returnValue($isEmpty)); return $field; }