Esempio n. 1
0
 public function testGetFieldName()
 {
     $fieldName = 'test';
     $this->fieldMetadata->expects($this->once())->method('getFieldName')->will($this->returnValue($fieldName));
     $this->assertEquals($fieldName, $this->fieldData->getFieldName());
 }
Esempio n. 2
0
 /**
  * Add field merge data
  *
  * @param FieldMetadata $metadata
  * @return FieldData
  */
 protected function addNewField(FieldMetadata $metadata)
 {
     $field = new FieldData($this, $metadata);
     $this->fields[$field->getFieldName()] = $field;
     return $field;
 }
Esempio n. 3
0
 /**
  * Add field merge data
  *
  * @param FieldMetadata $metadata
  * @return FieldData
  */
 protected function addNewField(FieldMetadata $metadata)
 {
     $field = new FieldData($this, $metadata);
     $this->fields[$field->getFieldName()] = $field;
     if ($this->getMasterEntity()) {
         $field->setSourceEntity($this->getMasterEntity());
     }
     return $field;
 }