Don't update a pre-existing file.
function testBulkImportNotUpdateExisting() {
$langcode = 'de';
// Translations should not exist.
$strings = array(
'Monday' => '',
'Tuesday' => '',
);
$this
->checkTranslations($strings, $langcode);
// Fill the {locale_file} table with a newer file.
$file = $this
->mockImportedPoFile($langcode, 1);
// Add language.
$this
->addLanguage($langcode);
// The file was not imported, the translation should not exist.
$strings = array(
'Monday' => '',
'Tuesday' => '',
);
$this
->checkTranslations($strings, $langcode);
$timestamp = db_query('SELECT timestamp FROM {locale_file} WHERE uri = :uri', array(
':uri' => $file->uri,
))
->fetchField();
$this
->assertEqual($timestamp, $file->timestamp);
}