Skip to content
Snippets Groups Projects
Commit 2129484e authored by catch's avatar catch
Browse files

Issue #2828143 by alexpott, klausi, xjm: Stop tests like...

Issue #2828143 by alexpott, klausi, xjm: Stop tests like LocaleConfigTranslationImportTest from failing if l.d.o becomes unavailable
parent 7a4a8c97
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,7 @@ protected function setUp() {
// tests.
$this->config('locale.settings')
->set('translation.import_enabled', TRUE)
->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
->save();
$this->drupalPlaceBlock('local_tasks_block');
}
......
......@@ -807,6 +807,7 @@ public function testLocaleDBStorage() {
// tests.
$this->config('locale.settings')
->set('translation.import_enabled', TRUE)
->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
->save();
$this->drupalLogin($this->adminUser);
......
......@@ -25,11 +25,6 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase {
*/
protected function setUp() {
parent::setUp();
// @todo Re-enable the test and only skip it when the translation cannot be
// downloaded, or provide a translation as a fixture instead. See
// https://www.drupal.org/project/drupal/issues/2828143.
$this->markTestSkipped();
}
/**
......@@ -51,6 +46,7 @@ public function testConfigTranslationImport() {
// tests.
$this->config('locale.settings')
->set('translation.import_enabled', TRUE)
->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
->save();
// Add translation permissions now that the locale module has been enabled.
......@@ -96,6 +92,7 @@ public function testConfigTranslationModuleInstall() {
// tests.
$this->config('locale.settings')
->set('translation.import_enabled', TRUE)
->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
->save();
// Add predefined language.
......@@ -154,6 +151,7 @@ public function testLocaleRemovalAndConfigOverrideDelete() {
// tests.
$this->config('locale.settings')
->set('translation.import_enabled', TRUE)
->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
->save();
// Add predefined language.
......@@ -191,6 +189,7 @@ public function testLocaleRemovalAndConfigOverridePreserve() {
// tests.
$this->config('locale.settings')
->set('translation.import_enabled', TRUE)
->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
->save();
// Add predefined language.
......
......@@ -38,6 +38,7 @@ protected function setUp() {
// tests.
$this->config('locale.settings')
->set('translation.import_enabled', TRUE)
->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
->save();
// Add custom language.
......
......@@ -52,6 +52,7 @@ protected function setUp() {
// tests.
$this->config('locale.settings')
->set('translation.import_enabled', TRUE)
->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
->save();
}
......
......@@ -63,6 +63,7 @@ protected function setUp() {
// tests.
$this->config('locale.settings')
->set('translation.import_enabled', TRUE)
->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
->save();
}
......
......@@ -84,7 +84,7 @@ public function testUpdateCron() {
// Check whether tasks are added to the queue.
$queue = \Drupal::queue('locale_translation', TRUE);
$this->assertEqual($queue->numberOfItems(), 3, 'Queue holds tasks for one project.');
$this->assertEqual($queue->numberOfItems(), 2, 'Queue holds tasks for one project.');
$item = $queue->claimItem();
$queue->releaseItem($item);
$this->assertEqual($item->data[1][0], 'contrib_module_two', 'Queue holds tasks for contrib module one.');
......@@ -95,7 +95,7 @@ public function testUpdateCron() {
// Check whether no more tasks are added to the queue.
$queue = \Drupal::queue('locale_translation', TRUE);
$this->assertEqual($queue->numberOfItems(), 3, 'Queue holds tasks for one project.');
$this->assertEqual($queue->numberOfItems(), 2, 'Queue holds tasks for one project.');
// Ensure last checked is updated to a greater time than the initial value.
sleep(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment