/**
  * @param FieldMetadata $fieldMetadata
  */
 protected function applyFieldMetadataConfig(FieldMetadata $fieldMetadata)
 {
     $this->entityConfigHelper->prepareFieldMetadataPropertyPath($fieldMetadata);
     $mergeConfig = $this->entityConfigHelper->getConfigByFieldMetadata(self::CONFIG_MERGE_SCOPE, $fieldMetadata);
     if ($mergeConfig) {
         $mergeOptions = $this->filterInverseOptions($mergeConfig->all(), $fieldMetadata->isDefinedBySourceEntity());
         $fieldMetadata->merge($mergeOptions);
     }
 }
 public function testPrepareFieldMetadataPropertyPathWithNotExtendField()
 {
     $className = 'Namespace\\Entity';
     $fieldName = 'test';
     $this->configManager->expects($this->once())->method('getProvider')->with('extend')->will($this->returnValue($this->extendConfigProvider));
     $fieldMetadata = $this->createFieldMetadata();
     $fieldMetadata->expects($this->once())->method('getSourceClassName')->will($this->returnValue($className));
     $fieldMetadata->expects($this->once())->method('getSourceFieldName')->will($this->returnValue($fieldName));
     $this->extendConfigProvider->expects($this->once())->method('hasConfig')->with($className, $fieldName)->will($this->returnValue(false));
     $fieldMetadata->expects($this->never())->method('set');
     $this->helper->prepareFieldMetadataPropertyPath($fieldMetadata);
 }