Exemplo n.º 1
0
 /**
  * @param EntityData $entityData
  * @param FieldMetadata $metadata
  */
 public function __construct(EntityData $entityData, FieldMetadata $metadata)
 {
     $this->entityData = $entityData;
     $this->metadata = $metadata;
     if ($metadata->getMergeMode()) {
         $this->mode = $metadata->getMergeMode();
     }
 }
Exemplo n.º 2
0
 public function testGetMergeMode()
 {
     $mergeModes = array(MergeModes::REPLACE, MergeModes::UNITE);
     $this->assertNull($this->fieldMetadata->getMergeMode());
     $this->fieldMetadata->set('merge_modes', $mergeModes);
     $this->assertEquals(MergeModes::REPLACE, $this->fieldMetadata->getMergeMode());
 }