Issue #2031175 by Sutharsan, penyaskito, vijaycs85, Berdir: Translation imports take a lot of time in tests even when not needed.

8.0.x
webchick 2014-01-02 09:53:03 -08:00
parent a05ecf2a9e
commit aeac3deb7b
6 changed files with 42 additions and 0 deletions

View File

@ -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();
}
/**

View File

@ -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';

View File

@ -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();
}
/**

View File

@ -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();
}
/**

View File

@ -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();
}
/**

View File

@ -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