public function testUpdateCheckStatus() { // Case when contributed modules are absent.
$this->
drupalGet('admin/reports/translations'
);
$this->
assertSession()->
pageTextContains('Missing translations for one project'
);
$config =
$this->
config('locale.settings'
);
// Set a flag to let the locale_test module replace the project data with a
// set of test projects.
\Drupal::
state()->
set('locale.test_projects_alter', TRUE
);
// Create local and remote translations files.
$this->
setTranslationFiles();
$config->
set('translation.default_filename', '%project-%version.%language._po'
)->
save();
// Set the test conditions.
$edit =
[ 'use_source' => LOCALE_TRANSLATION_USE_SOURCE_LOCAL,
];
$this->
drupalGet('admin/config/regional/translate/settings'
);
$this->
submitForm($edit, 'Save configuration'
);
// Get status of translation sources at local file system.
$this->
drupalGet('admin/reports/translations/check'
);