public function StaticMenuLinkOverridesTest::providerTestLoadOverride in Drupal 8
Provides test data for testLoadOverride.
File
- core/
tests/ Drupal/ Tests/ Core/ Menu/ StaticMenuLinkOverridesTest.php, line 60
Class
- StaticMenuLinkOverridesTest
- @coversDefaultClass \Drupal\Core\Menu\StaticMenuLinkOverrides @group Menu
Namespace
Drupal\Tests\Core\MenuCode
public function providerTestLoadOverride() {
$data = [];
// No specified ID.
$data[] = [
[
'test1' => [
'parent' => 'test0',
],
],
NULL,
[],
];
// 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;
}