$this->expectExceptionMessage("Module name 'invalid_module_name_over_the_maximum_allowed_character_length' is over the maximum allowed length of 50 characters");
$this->moduleInstaller->install([$module_name]);
}
// Since for the UI, the submit callback uses FALSE, test that too.
$message=newFormattableMarkup('Exception thrown when enabling as if via the UI the module %name with a name length over the allowed maximum',['%name'=>$module_name]);
$this->expectExceptionMessage("Module name 'invalid_module_name_over_the_maximum_allowed_character_length' is over the maximum allowed length of 50 characters");