function ComponentTranslationTest::buildSourceString
Creates random source string object.
Parameters
array $values: The values array.
Return value
\Drupal\locale\StringInterface A locale string.
File
-
core/
tests/ Drupal/ KernelTests/ Components/ ComponentTranslationTest.php, line 127
Class
- ComponentTranslationTest
- Tests the component can be translated.
Namespace
Drupal\KernelTests\ComponentsCode
protected function buildSourceString(array $values = []) : StringInterface {
return $this->storage
->createString($values += [
'source' => $this->randomMachineName(100),
'context' => $this->randomMachineName(20),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.