publicfunctiontestInterface(){ // No language added.
// Check status page and Available translation updates page.
$this->drupalGet('admin/reports/status'); $this->assertSession()->pageTextNotContains('Translation update status');
$result = $this->connection->executeQuery( 'SELECT COUNT(*) FROM migration WHERE class LIKE :class', ['class' => addcslashes($namespacePrefix, '\\_%') . '%'] ) ->fetchOne();
/**
* Tests interface translation update using cron.
*/ publicfunctiontestUpdateCron(){ // 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);
$admin_user = $this->drupalCreateUser([ 'administer modules', 'administer site configuration', 'administer languages', 'access administration pages', 'translate interface', ]); $this->drupalLogin($admin_user); // We use German as test language. This language must match the translation
// file that come with the locale_test module (test.de.po) and can therefore
// not be chosen randomly.
$this->addLanguage('de'); }
/**
* Checks if local or remote translation sources are detected.
*
* The translation status process by default checks the status of the
* installed projects. For testing purpose a predefined set of modules with
* fixed file names and release versions is used. This custom project
* definition is applied using a hook_locale_translation_projects_alter
* implementation in the locale_test module.
*
* This test generates a set of local and remote translation files in their
* respective local and remote translation directory. The test checks whether
* the most recent files are selected in the different check scenarios: check
* for local files only, check for both local and remote files.
*/