Skip to content
Snippets Groups Projects
Verified Commit b9f1f9a8 authored by Dave Long's avatar Dave Long
Browse files

Issue #3385837 by vbouchet: PathContentModerationTest should use API to set up language

(cherry picked from commit 815a709f)
parent e02f739e
No related branches found
No related tags found
7 merge requests!11628Update file MediaLibraryWidget.php,!7564Revert "Issue #3364773 by roshnichordiya, Chris Matthews, thakurnishant_06,...,!5752Issue #3275828 by joachim, quietone, bradjones1, Berdir: document the reason...,!5627Issue #3261805: Field not saved when change of 0 on string start,!5427Issue #3338518: send credentials in ajax if configured in CORS settings.,!5395Issue #3387916 by fjgarlin, Spokje: Each GitLab job exposes user email,!3106Issue #3017548: "Filtered HTML" text format does not support manual teaser break (<!--break-->)
Pipeline #47745 failed
Pipeline: drupal

#47761

    Pipeline: drupal

    #47760

      Pipeline: drupal

      #47759

        +1
        ......@@ -2,7 +2,9 @@
        namespace Drupal\Tests\path\Functional;
        use Drupal\Core\Language\LanguageInterface;
        use Drupal\language\Entity\ConfigurableLanguage;
        use Drupal\language\Entity\ContentLanguageSettings;
        use Drupal\Tests\BrowserTestBase;
        use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait;
        ......@@ -59,17 +61,17 @@ protected function setUp(): void {
        $this->drupalGet('admin/config/regional/language/detection');
        $this->submitForm($edit, 'Save settings');
        // Enable translation for moderated node.
        $edit = [
        'entity_types[node]' => 1,
        'settings[node][moderated][translatable]' => 1,
        'settings[node][moderated][fields][path]' => 1,
        'settings[node][moderated][fields][body]' => 1,
        'settings[node][moderated][settings][language][language_alterable]' => 1,
        ];
        $this->drupalGet('admin/config/regional/content-language');
        $this->submitForm($edit, 'Save configuration');
        \Drupal::entityTypeManager()->clearCachedDefinitions();
        // Enable translation for page.
        $config = ContentLanguageSettings::loadByEntityTypeBundle('node', 'moderated');
        $config->setDefaultLangcode(LanguageInterface::LANGCODE_SITE_DEFAULT);
        $config->setLanguageAlterable(TRUE);
        $config->save();
        $content_translation_manager = $this->container->get('content_translation.manager');
        $content_translation_manager->setEnabled('node', 'moderated', TRUE);
        $content_translation_manager->setBundleTranslationSettings('node', 'moderated', [
        'untranslatable_fields_hide' => FALSE,
        ]);
        }
        /**
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment