1 => MenuLinkMock::
create(['id' => 'test.example1', 'route_name' => 'example1', 'title' => 'foo', 'parent' => ''
]),
2 => MenuLinkMock::
create(['id' => 'test.example2', 'route_name' => 'example2', 'title' => 'bar', 'parent' => 'test.example1', 'route_parameters' =>
['foo' => 'bar'
]]),
3 => MenuLinkMock::
create(['id' => 'test.example3', 'route_name' => 'example3', 'title' => 'baz', 'parent' => 'test.example2', 'route_parameters' =>
['baz' => 'qux'
]]),
4 => MenuLinkMock::
create(['id' => 'test.example4', 'route_name' => 'example4', 'title' => 'qux', 'parent' => 'test.example3'
]),
5 => MenuLinkMock::
create(['id' => 'test.example5', 'route_name' => 'example5', 'title' => 'foofoo', 'parent' => ''
]),
6 => MenuLinkMock::
create(['id' => 'test.example6', 'route_name' => '', 'url' => 'https://www.drupal.org/', 'title' => 'barbar', 'parent' => ''
]),
7 => MenuLinkMock::
create(['id' => 'test.example7', 'route_name' => 'example7', 'title' => 'bazbaz', 'parent' => ''
]),
8 => MenuLinkMock::
create(['id' => 'test.example8', 'route_name' => 'example8', 'title' => 'quxqux', 'parent' => ''
]),
9 => DynamicMenuLinkMock::
create(['id' => 'test.example9', 'parent' => ''
])->
setCurrentUser($this->currentUser
),
];
$this->originalTree =
[];
$this->originalTree
[1
] =
new MenuLinkTreeElement($this->links
[1
], FALSE, 1, FALSE,
[]);
$this->originalTree
[2
] =
new MenuLinkTreeElement($this->links
[2
], TRUE, 1, FALSE,
[ 3 =>
new MenuLinkTreeElement($this->links
[3
], TRUE, 2, FALSE,
[ 4 =>
new MenuLinkTreeElement($this->links
[4
], FALSE, 3, FALSE,
[]),
]),
]);
$this->originalTree
[5
] =
new MenuLinkTreeElement($this->links
[5
], TRUE, 1, FALSE,
[ 7 =>
new MenuLinkTreeElement($this->links
[7
], FALSE, 2, FALSE,
[]),
]);
$this->originalTree
[6
] =
new MenuLinkTreeElement($this->links
[6
], FALSE, 1, FALSE,
[]);
$this->originalTree
[8
] =
new MenuLinkTreeElement($this->links
[8
], FALSE, 1, FALSE,
[]);
$this->originalTree
[9
] =
new MenuLinkTreeElement($this->links
[9
], FALSE, 1, FALSE,
[]);
}