You are here

public function FormattableMarkupKernelTest::testFormattableMarkupUriWithExceptionUri in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php \Drupal\KernelTests\Component\Render\FormattableMarkupKernelTest::testFormattableMarkupUriWithExceptionUri()
  2. 10 core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php \Drupal\KernelTests\Component\Render\FormattableMarkupKernelTest::testFormattableMarkupUriWithExceptionUri()

@dataProvider providerTestFormattableMarkupUriWithException

File

core/tests/Drupal/KernelTests/Component/Render/FormattableMarkupKernelTest.php, line 113

Class

FormattableMarkupKernelTest
Provides a test covering integration of FormattableMarkup with other systems.

Namespace

Drupal\KernelTests\Component\Render

Code

public function testFormattableMarkupUriWithExceptionUri($string, $uri) {

  // Should throw an \InvalidArgumentException, due to Uri::toString().
  $this
    ->expectException(\InvalidArgumentException::class);
  $args = self::getFormattableMarkupUriArgs($uri);
  new FormattableMarkup($string, $args);
}