/**
  * 
  * Update the failures into the data so in the next run no failures will accure
  * Should be use with extreme care after completly reviewing the failure file  
  * @param unknown_type $dataFile
  * @param unknown_type $failuresFile
  */
 public static function UpdateResults($dataFilePath, $failuresFilePath)
 {
     //Returns the inputs for the unit tests
     KalturaLog::debug("dataFilePath [{$dataFilePath}], failuresFilePath [{$failuresFilePath}]\n");
     $oldFilesIndex = KalturaTestResultUpdater::getLastDataFileIndex($dataFilePath);
     copy($dataFilePath, $dataFilePath . ".old" . $oldFilesIndex);
     $oldTestDataFile = KalturaTestCaseDataFile::generateFromDataXml($dataFilePath);
     $testsFailures = KalturaTestCaseFailures::generateFromXml($failuresFilePath);
     $newTestDataFile = KalturaTestResultUpdater::update($oldTestDataFile, $testsFailures);
     $newTestDataDom = KalturaTestCaseDataFile::toXml($newTestDataFile);
     $newDataFile = fopen($dataFilePath, "w+");
     $newTestDataDom->formatOutput = true;
     KalturaLog::debug("Writing new test data file [" . $newTestDataDom->saveXML() . "]");
     fwrite($newDataFile, $newTestDataDom->saveXML());
 }