$language_count = 3;
// Strings 1 and 2 will have some common prefix.
// Source 1 will have all translations, not customized.
// Source 2 will have all translations, customized.
// Source 3 will have no translations.
$prefix =
$this->
randomMachineName(100
);
$source1 =
$this->
buildSourceString(['source' =>
$prefix .
$this->
randomMachineName(100
)])->
save();
$source2 =
$this->
buildSourceString(['source' =>
$prefix .
$this->
randomMachineName(100
)])->
save();
$source3 =
$this->
buildSourceString()->
save();
// Load all source strings.
$strings =
$this->storage->
getStrings([]);
$this->
assertCount(3,
$strings);
// Load all source strings matching a given string.
$filter_options['filters'
] =
['source' =>
$prefix];
$strings =
$this->storage->
getStrings([],
$filter_options);
$this->
assertCount(2,
$strings);
// Not customized translations.
$translate1 =
$this->
createAllTranslations($source1);
// Customized translations.
$this->
createAllTranslations($source2,
['customized' => LOCALE_CUSTOMIZED
]);
// Try quick search function with different field combinations.