From 13cf026d79ceba52672ef3282d3cd36acd1768ae Mon Sep 17 00:00:00 2001 From: Dave Long <dave@longwaveconsulting.com> Date: Fri, 10 Nov 2023 23:35:32 +0000 Subject: [PATCH] Issue #3385811 by vbouchet: ContentTranslationUntranslatableFieldsTest should use API to set up language --- .../ContentTranslationUntranslatableFieldsTest.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php index f436ed27922d..6cdc58b8041f 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php @@ -32,11 +32,9 @@ protected function setUp(): void { // Configure one field as untranslatable. $this->drupalLogin($this->administrator); - $edit = [ - 'settings[' . $this->entityTypeId . '][' . $this->bundle . '][fields][' . $this->fieldName . ']' => 0, - ]; - $this->drupalGet('admin/config/regional/content-language'); - $this->submitForm($edit, 'Save configuration'); + + $field = FieldConfig::loadByName($this->entityTypeId, $this->bundle, $this->fieldName); + $field->setTranslatable(FALSE)->save(); /** @var \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager */ $entity_field_manager = $this->container->get('entity_field.manager'); -- GitLab