@@ -61,15 +61,15 @@ public function testNavigationItems()
6161 // The constructors take three parameters: the destination, the label, and the optional priority.
6262 // The destination can be a Route instance, a route key string, or an external URL.
6363
64- // Using a Route instance will automatically fill in the label and priority from the route's connected page.
65- $ item = new NavigationItem (Routes::get ('index ' ));
66- $ this ->assertData (['destination ' => 'index.html ' , 'label ' => 'Home ' , 'priority ' => 0 ], $ item );
67-
6864 // Using a route key provides the same functionality as using a Route instance.
6965 // Make sure the route exists otherwise it will be treated as a link.
7066 $ item = new NavigationItem ('index ' );
7167 $ this ->assertEquals (new NavigationItem (Routes::get ('index ' )), $ item );
7268
69+ // Using a Route instance will automatically fill in the label and priority from the route's connected page.
70+ $ item = new NavigationItem (Routes::get ('index ' ));
71+ $ this ->assertData (['destination ' => 'index.html ' , 'label ' => 'Home ' , 'priority ' => 0 ], $ item );
72+
7373 // Setting the label and/or priorities will override the page's data.
7474 $ item = new NavigationItem (Routes::get ('index ' ), 'Custom Label ' , 10 );
7575 $ this ->assertData (['destination ' => 'index.html ' , 'label ' => 'Custom Label ' , 'priority ' => 10 ], $ item );
0 commit comments