// Create a content type.
$this->
drupalCreateContentType([ 'name' => 'article',
'type' => 'article',
]);
$this->
drupalLogin($this->rootUser
);
// Enable URL language detection and selection.
$edit =
['language_interface[enabled][language-url]' => 1
];
$this->
drupalGet('admin/config/regional/language/detection'
);
$this->
submitForm($edit, 'Save settings'
);
// Enable translation for article node.
$edit =
[ 'entity_types[node]' => 1,
'settings[node][article][translatable]' => 1,
'settings[node][article][fields][path]' => 1,
'settings[node][article][fields][body]' => 1,
'settings[node][article][settings][language][language_alterable]' => 1,
];
$this->
drupalGet('admin/config/regional/content-language'
);
$this->
submitForm($edit, 'Save configuration'
);