function LinkUriTest::providerTestNotRouted
Same name in other branches
- 9 core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php \Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\process\LinkUriTest::providerTestNotRouted()
- 10 core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php \Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\process\LinkUriTest::providerTestNotRouted()
- 11.x core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php \Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\process\LinkUriTest::providerTestNotRouted()
Provides test cases for LinkUriTest::testNotRouted().
Return value
array An array of test cases, each which the following values:
- The value array to pass to LinkUri::transform().
- The expected path returned by LinkUri::transform().
- (optional) A URL object that the path validator prophecy will return.
File
-
core/
modules/ menu_link_content/ tests/ src/ Kernel/ Plugin/ migrate/ process/ LinkUriTest.php, line 120
Class
Namespace
Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\processCode
public function providerTestNotRouted() {
$tests = [];
$message = 'The path "%s" failed validation.';
$value = '/test';
$expected = 'internal:/test';
$exception_message = sprintf($message, $expected);
$tests['leading_slash'] = [
$value,
$exception_message,
];
$value = 'test';
$expected = 'internal:/test';
$exception_message = sprintf($message, $expected);
$tests['without_scheme'] = [
$value,
$exception_message,
];
return $tests;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.