public function TestTranslationManager::translateString in Drupal 9
Same name and namespace in other branches
- 8 core/modules/user/tests/src/Unit/PermissionHandlerTest.php \Drupal\Tests\user\Unit\TestTranslationManager::translateString()
Translates a TranslatableMarkup object to a string.
Parameters
\Drupal\Core\StringTranslation\TranslatableMarkup $translated_string: A TranslatableMarkup object.
Return value
string The translated string.
Overrides TranslationInterface::translateString
File
- core/
modules/ user/ tests/ src/ Unit/ PermissionHandlerTest.php, line 403 - Contains \Drupal\Tests\user\Unit\PermissionHandlerTest.
Class
- TestTranslationManager
- Implements a translation manager in tests.
Namespace
Drupal\Tests\user\UnitCode
public function translateString(TranslatableMarkup $translated_string) {
return $translated_string
->getUntranslatedString();
}