function StaticMenuLinkOverridesTest::providerTestLoadOverride
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest::providerTestLoadOverride()
- 8.9.x core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest::providerTestLoadOverride()
- 10 core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest::providerTestLoadOverride()
Provides test data for testLoadOverride.
File
-
core/
tests/ Drupal/ Tests/ Core/ Menu/ StaticMenuLinkOverridesTest.php, line 50
Class
- StaticMenuLinkOverridesTest
- @coversDefaultClass \Drupal\Core\Menu\StaticMenuLinkOverrides @group Menu
Namespace
Drupal\Tests\Core\MenuCode
public static function providerTestLoadOverride() {
$data = [];
// Valid ID.
$data[] = [
[
'test1' => [
'parent' => 'test0',
],
],
'test1',
[
'parent' => 'test0',
],
];
// Non existing ID.
$data[] = [
[
'test1' => [
'parent' => 'test0',
],
],
'test2',
[],
];
// Ensure that the ID is encoded properly
$data[] = [
[
'test1__la___ma' => [
'parent' => 'test0',
],
],
'test1.la__ma',
[
'parent' => 'test0',
],
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.