// Delete English.
$this->
drupalGet('admin/config/regional/language/delete/en'
);
$this->
submitForm([], 'Delete'
);
// Changing the default language causes a container rebuild. Therefore need
// to rebuild the container in the test environment.
$this->
rebuildContainer();
// Verify that French is the only language.
$this->container->
get('language_manager'
)->
reset();
$this->
assertFalse(\Drupal::
languageManager()->
isMultilingual(), 'Site is mono-lingual'
);
$this->
assertEquals('fr', \Drupal::
languageManager()->
getDefaultLanguage()->
getId(), 'French is the default language'
);
// Set language detection to URL.
$edit =
['language_interface[enabled][language-url]' => TRUE
];
$this->
drupalGet('admin/config/regional/language/detection'
);
$this->
submitForm($edit, 'Save settings'
);
$this->
drupalPlaceBlock('local_actions_block'
);
} /**
* Verifies that links do not have language prefixes in them.
*/