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