/** * 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; }
public function testGetContents() { $this->_readerMock->expects($this->once())->method('getContents')->with('someFile')->will($this->returnValue('123')); $this->assertEquals('123', $this->_model->getContents('someFile')); }