You are here

public function TranslatableMarkupTest::testIsStringAssertion in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php \Drupal\Tests\Core\StringTranslation\TranslatableMarkupTest::testIsStringAssertion()

@expectedException \InvalidArgumentException @expectedExceptionMessage $string ("foo") must be a string.

@covers ::__construct

File

core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php, line 95
Contains \Drupal\Tests\Core\StringTranslation\TranslatableMarkupTest.

Class

TranslatableMarkupTest
Tests the TranslatableMarkup class.

Namespace

Drupal\Tests\Core\StringTranslation

Code

public function testIsStringAssertion() {
  $translation = $this
    ->getStringTranslationStub();
  new TranslatableMarkup(new TranslatableMarkup('foo', [], [], $translation));
}