Ejemplo n.º 1
0
 /**
  * Process config data
  *
  * @param array $data
  * @return array
  */
 public function process(array $data)
 {
     foreach ($this->_metadata as $path => $metadata) {
         /** @var \Magento\Framework\App\Config\Data\ProcessorInterface $processor */
         $processor = $this->_processorFactory->get($metadata['backendModel']);
         $value = $processor->processValue($this->_getValue($data, $path));
         $this->_setValue($data, $path, $value);
     }
     return $data;
 }
 /**
  * @covers \Magento\Framework\App\Config\Data\ProcessorFactory::get
  */
 public function testGetMemoryCache()
 {
     $this->_objectManager->expects($this->once())->method('create')->with('Magento\\Framework\\App\\Config\\Data\\TestBackendModel')->will($this->returnValue($this->_processorMock));
     $this->_model->get('Magento\\Framework\\App\\Config\\Data\\TestBackendModel');
     $this->_model->get('Magento\\Framework\\App\\Config\\Data\\TestBackendModel');
 }