Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / locale / tests / src / Functional / LocaleConfigTranslationImportTest.php
index df7a5ffeea1f140a7ce557824bb519ba9a59d6bc..058d9ddf8e77eb495a68b2421e2c150611bd4acc 100644 (file)
@@ -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 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase {
     // 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 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase {
     // tests.
     $this->config('locale.settings')
       ->set('translation.import_enabled', TRUE)
+      ->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
       ->save();
 
     // Add predefined language.
@@ -134,7 +131,7 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase {
     $expected = [
       'translatable_no_default' => 'This translation is preserved',
       'translatable_default_with_translation' => 'This translation is preserved',
-      'translatable_default_with_no_translation' => 'This translation is preserved'
+      'translatable_default_with_no_translation' => 'This translation is preserved',
     ];
     $this->assertEqual($expected, $override->get());
   }
@@ -154,6 +151,7 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase {
     // 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 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase {
     // tests.
     $this->config('locale.settings')
       ->set('translation.import_enabled', TRUE)
+      ->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL)
       ->save();
 
     // Add predefined language.
@@ -205,7 +204,7 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase {
     $expected = [
       'translatable_default_with_translation' => 'Locale can translate Afrikaans',
       'translatable_no_default' => 'This translation is preserved',
-      'translatable_default_with_no_translation' => 'This translation is preserved'
+      'translatable_default_with_no_translation' => 'This translation is preserved',
     ];
     $this->assertEqual($expected, $override->get());
 
@@ -227,7 +226,7 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase {
     $override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'locale_test_translate.settings');
     $expected = [
       'translatable_no_default' => 'This translation is preserved',
-      'translatable_default_with_no_translation' => 'This translation is preserved'
+      'translatable_default_with_no_translation' => 'This translation is preserved',
     ];
     $this->assertEqual($expected, $override->get());
   }