Esempio n. 1
0
 /**
  * Get configuration per file
  *
  * @return array
  */
 public function getConfiguration()
 {
     $files = $this->_fileManager->getFileList($this->_basePath . '/' . \Magento\Tools\Migration\System\Configuration\Reader::SYSTEM_CONFIG_PATH_PATTERN);
     $result = [];
     foreach ($files as $fileName) {
         $result[$fileName] = $this->_mapper->transform($this->_parser->parse($this->_getDOMDocument($this->_fileManager->getContents($fileName))));
     }
     return $result;
 }
Esempio n. 2
0
 public function testTransformWithoutSetTabsAndSections()
 {
     $config = ['comment' => 'test comment'];
     $this->_tabMapperMock->expects($this->once())->method('transform')->with([])->will($this->returnArgument(0));
     $this->_sectionMapperMock->expects($this->once())->method('transform')->with([])->will($this->returnArgument(0));
     $expected = ['comment' => 'test comment', 'nodes' => []];
     $actual = $this->_object->transform($config);
     $this->assertEquals($expected, $actual);
 }