// Make the image field non-translatable.
$edit =
['settings[node][article][fields][field_image]' => FALSE
];
$this->
drupalGet('admin/config/regional/content-language'
);
$this->
submitForm($edit, 'Save configuration'
);
// Create a node.
$nid =
$this->
createEntity(['title' => 'Node with multi-value image field en title'
], 'en'
);
// Add a French translation and assert the title markup is not escaped.
$this->
drupalGet("node/
$nid/translations/add/en/fr"
);
$markup = 'Image <span class="translation-entity-all-languages">(all languages)</span>';
$this->
assertSession()->
assertNoEscaped($markup);
$this->
assertSession()->
responseContains($markup);
} /**
* Test that when content is language neutral, it uses interface language.
*
* When language neutral content is displayed on interface language, it should
* consider the interface language for creating the content link.
*/
public function testUrlPrefixOnLanguageNeutralContent() { $this->
drupalLogin($this->administrator
);