You are here

public function TestTranslationManager::translateString in Drupal 8

Same name and namespace in other branches
  1. 9 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 424
Contains \Drupal\Tests\user\Unit\PermissionHandlerTest.

Class

TestTranslationManager
Implements a translation manager in tests.

Namespace

Drupal\Tests\user\Unit

Code

public function translateString(TranslatableMarkup $translated_string) {
  return $translated_string
    ->getUntranslatedString();
}