Issue #2031175 by Sutharsan, penyaskito, vijaycs85, Berdir: Translation imports take a lot of time in tests even when not needed.
parent
a05ecf2a9e
commit
aeac3deb7b
|
@ -80,6 +80,12 @@ class ConfigTranslationListUiTest extends WebTestBase {
|
|||
// Create and log in user.
|
||||
$this->adminUser = $this->drupalCreateUser($permissions);
|
||||
$this->drupalLogin($this->adminUser);
|
||||
|
||||
// Enable import of translations. By default this is disabled for automated
|
||||
// tests.
|
||||
\Drupal::config('locale.settings')
|
||||
->set('translation.import_enabled', TRUE)
|
||||
->save();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -566,6 +566,12 @@ class ConfigTranslationUiTest extends WebTestBase {
|
|||
* Test translation storage in locale storage.
|
||||
*/
|
||||
public function testLocaleDBStorage() {
|
||||
// Enable import of translations. By default this is disabled for automated
|
||||
// tests.
|
||||
\Drupal::config('locale.settings')
|
||||
->set('translation.import_enabled', TRUE)
|
||||
->save();
|
||||
|
||||
$this->drupalLogin($this->admin_user);
|
||||
|
||||
$langcode = 'xx';
|
||||
|
|
|
@ -35,6 +35,12 @@ class LocaleConfigTranslationTest extends WebTestBase {
|
|||
parent::setUp();
|
||||
// Add a default locale storage for all these tests.
|
||||
$this->storage = $this->container->get('locale.storage');
|
||||
|
||||
// Enable import of translations. By default this is disabled for automated
|
||||
// tests.
|
||||
\Drupal::config('locale.settings')
|
||||
->set('translation.import_enabled', TRUE)
|
||||
->save();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,6 +43,12 @@ class LocaleImportFunctionalTest extends WebTestBase {
|
|||
|
||||
$this->admin_user = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages'));
|
||||
$this->drupalLogin($this->admin_user);
|
||||
|
||||
// Enable import of translations. By default this is disabled for automated
|
||||
// tests.
|
||||
\Drupal::config('locale.settings')
|
||||
->set('translation.import_enabled', TRUE)
|
||||
->save();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -51,6 +51,12 @@ class LocaleUpdateBase extends WebTestBase {
|
|||
$this->timestamp_medium = REQUEST_TIME - 200;
|
||||
$this->timestamp_new = REQUEST_TIME - 100;
|
||||
$this->timestamp_now = REQUEST_TIME;
|
||||
|
||||
// Enable import of translations. By default this is disabled for automated
|
||||
// tests.
|
||||
\Drupal::config('locale.settings')
|
||||
->set('translation.import_enabled', TRUE)
|
||||
->save();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
cache_strings: true
|
||||
javascript:
|
||||
directory: languages
|
||||
translation:
|
||||
use_source: remote_and_local
|
||||
default_filename: '%project-%version.%language.po'
|
||||
default_server_pattern: 'http://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po'
|
||||
overwrite_customized: false
|
||||
overwrite_not_customized: true
|
||||
update_interval_days: 0
|
||||
path: ''
|
||||
import_enabled: false
|
Loading…
Reference in New Issue