// Setup users.
$admin_user =
$this->
drupalCreateUser([ 'administer languages',
'administer content types',
'access administration pages',
'create page content',
'edit own page content',
]);
$this->
drupalLogin($admin_user);
// Add a new language.
ConfigurableLanguage::
createFromLangcode('it'
)->
save();
// 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'
);
// Set "Basic page" content type to use multilingual support.
$edit =
[ 'language_configuration[language_alterable]' => TRUE,
];
$this->
drupalGet('admin/structure/types/manage/page'
);