public function TranslatableMarkupTest::testIsStringAssertionWithFormattableMarkup in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php \Drupal\Tests\Core\StringTranslation\TranslatableMarkupTest::testIsStringAssertionWithFormattableMarkup()
@expectedException \InvalidArgumentException @expectedExceptionMessage $string ("foo") must be a string.
@covers ::__construct
File
- core/
tests/ Drupal/ Tests/ Core/ StringTranslation/ TranslatableMarkupTest.php, line 106 - Contains \Drupal\Tests\Core\StringTranslation\TranslatableMarkupTest.
Class
- TranslatableMarkupTest
- Tests the TranslatableMarkup class.
Namespace
Drupal\Tests\Core\StringTranslationCode
public function testIsStringAssertionWithFormattableMarkup() {
$translation = $this
->getStringTranslationStub();
$formattable_string = new FormattableMarkup('@bar', [
'@bar' => 'foo',
]);
new TranslatableMarkup($formattable_string);
}