Validates system languages are ordered after configurable languages.
string $state: (optional) A string for customizing assert messages, containing the description of the state of the check, for example: 'after re-ordering'. Defaults to 'by default'.
protected function checkConfigurableLanguageWeight($state = 'by default') {
// Reset language list.
drupal_static_reset('language_list');
$max_configurable_language_weight = $this
->getHighestConfigurableLanguageWeight();
$replacements = array(
'@event' => $state,
);
foreach (language_list(Language::STATE_LOCKED) as $locked_language) {
$replacements['%language'] = $locked_language->name;
$this
->assertTrue($locked_language->weight > $max_configurable_language_weight, format_string('System language %language has higher weight than configurable languages @event', $replacements));
}
}