You are here

public function LinkUriTest::testNotRouted in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php \Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\process\LinkUriTest::testNotRouted()

Tests that Non routed URLs throws an exception.

@dataProvider providerTestNotRouted

Parameters

string $value: The value to pass to LinkUri::transform().

string $exception_message: The expected exception message.

File

core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php, line 93

Class

LinkUriTest
Tests \Drupal\menu_link_content\Plugin\migrate\process\LinkUri.

Namespace

Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\process

Code

public function testNotRouted($value, $exception_message) {
  $this
    ->expectException(MigrateException::class);
  $this
    ->expectExceptionMessage($exception_message);
  $this
    ->doTransform($value);
}