GetFileContent($sInputXmlFileName); $sExpectedXml = $this->GetFileContent($sExpectedXmlFileName); $oInputDocument = new DOMDocument(); libxml_clear_errors(); $oInputDocument->preserveWhiteSpace = false; $oInputDocument->loadXML($sInputXml); $oInputDocument->formatOutput = true; $oDesignFormat = new iTopDesignFormat($oInputDocument); $oDesignFormat->Convert($sTargetVersion); $sConvertedXml = $oInputDocument->saveXML(); $this->assertEquals($sExpectedXml, $sConvertedXml); } private function GetFileContent($sFileName) { $sCurrentPath = __DIR__; return file_get_contents($sCurrentPath.DIRECTORY_SEPARATOR.$sFileName.'.xml'); } public function MigrationMethodProvider() { return array( '1.7 to 1.6' => array('1.6', '1.7_to_1.6.input', '1.7_to_1.6.expected'), '1.7 to 3.0' => array('3.0', '1.7_to_3.0.input', '1.7_to_3.0.expected'), '3.0 to 1.7' => array('1.7', '3.0_to_1.7.input', '3.0_to_1.7.expected'), ); } }