/** * 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 testGetFileList() { $expected = array('file1', 'file2'); $this->_readerMock->expects($this->once())->method('getFileList')->with('pattern')->will($this->returnValue($expected)); $this->assertEquals($expected, $this->_model->getFileList('pattern')); }