You are here

public function LinkUriTest::providerTestRouted in Drupal 10

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::providerTestRouted()
  2. 9 core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php \Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\process\LinkUriTest::providerTestRouted()

Provides test cases for LinkUriTest::testTransform().

Return value

array An array of test cases, each which the following values:

File

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

Class

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

Namespace

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

Code

public function providerTestRouted() {
  $tests = [];
  $value = 'http://example.com';
  $expected = 'http://example.com';
  $tests['with_scheme'] = [
    $value,
    $expected,
  ];
  $value = '<front>';
  $expected = 'internal:/';
  $tests['front'] = [
    $value,
    $expected,
  ];
  $value = '<nolink>';
  $expected = 'route:<nolink>';
  $tests['nolink'] = [
    $value,
    $expected,
  ];
  return $tests;
}