Creates, saves and returns a translator.
\Drupal\tmgmt\TranslatorInterface
function createTranslator() {
$translator = Translator::create([
'name' => strtolower($this
->randomMachineName()),
'label' => $this
->randomMachineName(),
'plugin' => 'test_translator',
'remote_languages_mappings' => [],
'settings' => [
'key' => $this
->randomMachineName(),
'another_key' => $this
->randomMachineName(),
],
]);
$this
->assertEquals(SAVED_NEW, $translator
->save());
return $translator;
}