Commit f800f466 authored by catch's avatar catch
Browse files

Issue #3240455 by alexpott, daffie: Fix...

Issue #3240455 by alexpott, daffie: Fix Drupal\Tests\content_translation\Functional\ContentTranslationSettingsTest so it does not trigger deprecations on PHP 8.1
parent 2145374d
Loading
Loading
Loading
Loading
+3 −3
Changes for core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -74,12 +74,12 @@ public function testSettingsUI() {
    // Test that the translation settings are ignored if the bundle is marked
    // translatable but the entity type is not.
    $edit = ['settings[comment][comment_article][translatable]' => TRUE];
    $this->assertSettings('comment', NULL, FALSE, $edit);
    $this->assertSettings('comment', 'comment_article', FALSE, $edit);

    // Test that the translation settings are ignored if only a field is marked
    // as translatable and not the related entity type and bundle.
    $edit = ['settings[comment][comment_article][fields][comment_body]' => TRUE];
    $this->assertSettings('comment', NULL, FALSE, $edit);
    $this->assertSettings('comment', 'comment_article', FALSE, $edit);

    // Test that the translation settings are not stored if an entity type and
    // bundle are marked as translatable but no field is.
@@ -182,7 +182,7 @@ public function testSettingsUI() {
      'settings[node][article][translatable]' => TRUE,
      'settings[node][article][fields][title]' => TRUE,
    ];
    $this->assertSettings('node', NULL, TRUE, $edit);
    $this->assertSettings('node', 'article', TRUE, $edit);

    foreach ([TRUE, FALSE] as $translatable) {
      // Test that configurable field translatability is correctly switched.