@@ -44,36 +44,36 @@ public function testConstruct()
4444 $ route = new Route (new MarkdownPage ());
4545 $ item = new NavItem ($ route , 'Test ' , 500 );
4646
47- $ this ->assertSame ($ route , $ item ->getDestination ());
47+ $ this ->assertSame ($ route , $ item ->getRoute ());
4848 }
4949
5050 public function testPassingRouteInstanceToConstructorUsesRouteInstance ()
5151 {
5252 $ route = new Route (new MarkdownPage ());
53- $ this ->assertSame ($ route , (new NavItem ($ route , 'Home ' ))->getDestination ());
53+ $ this ->assertSame ($ route , (new NavItem ($ route , 'Home ' ))->getRoute ());
5454 }
5555
5656 public function testPassingRouteKeyToConstructorUsesRouteInstance ()
5757 {
5858 $ route = Routes::get ('index ' );
5959
60- $ this ->assertSame ($ route , (new NavItem ('index ' , 'Home ' ))->getDestination ());
60+ $ this ->assertSame ($ route , (new NavItem ('index ' , 'Home ' ))->getRoute ());
6161 }
6262
6363 public function testPassingUrlToConstructorUsesExternalRoute ()
6464 {
6565 $ item = new NavItem ('https://example.com ' , 'Home ' );
66- $ this ->assertInstanceOf (ExternalRoute::class, $ item ->getDestination ());
67- $ this ->assertEquals (new ExternalRoute ('https://example.com ' ), $ item ->getDestination ());
68- $ this ->assertSame ('https://example.com ' , (string ) $ item ->getDestination ());
66+ $ this ->assertInstanceOf (ExternalRoute::class, $ item ->getRoute ());
67+ $ this ->assertEquals (new ExternalRoute ('https://example.com ' ), $ item ->getRoute ());
68+ $ this ->assertSame ('https://example.com ' , (string ) $ item ->getRoute ());
6969 }
7070
7171 public function testPassingUnknownRouteKeyToConstructorUsesExternalRoute ()
7272 {
7373 $ item = new NavItem ('foo ' , 'Home ' );
74- $ this ->assertInstanceOf (ExternalRoute::class, $ item ->getDestination ());
75- $ this ->assertEquals (new ExternalRoute ('foo ' ), $ item ->getDestination ());
76- $ this ->assertSame ('foo ' , (string ) $ item ->getDestination ());
74+ $ this ->assertInstanceOf (ExternalRoute::class, $ item ->getRoute ());
75+ $ this ->assertEquals (new ExternalRoute ('foo ' ), $ item ->getRoute ());
76+ $ this ->assertSame ('foo ' , (string ) $ item ->getRoute ());
7777 }
7878
7979 public function testCanConstructWithChildren ()
@@ -86,7 +86,7 @@ public function testCanConstructWithChildren()
8686 $ item = new NavItem ($ route , 'Test ' , 500 , null , $ children );
8787
8888 $ this ->assertSame ('Test ' , $ item ->getLabel ());
89- $ this ->assertNull ($ item ->getDestination ());
89+ $ this ->assertNull ($ item ->getRoute ());
9090 $ this ->assertSame (500 , $ item ->getPriority ());
9191
9292 $ this ->assertCount (2 , $ item ->getChildren ());
@@ -111,7 +111,7 @@ public function testCanConstructWithChildrenWithoutRoute()
111111 $ item = new NavItem ('' , 'Test ' , 500 , null , $ children );
112112
113113 $ this ->assertSame ('Test ' , $ item ->getLabel ());
114- $ this ->assertNull ($ item ->getDestination ());
114+ $ this ->assertNull ($ item ->getRoute ());
115115
116116 $ this ->assertCount (2 , $ item ->getChildren ());
117117 $ this ->assertSame ($ children , $ item ->getChildren ());
@@ -122,7 +122,7 @@ public function testGetDestination()
122122 $ route = new Route (new InMemoryPage ('foo ' ));
123123 $ navItem = new NavItem ($ route , 'Page ' , 500 );
124124
125- $ this ->assertSame ($ route , $ navItem ->getDestination ());
125+ $ this ->assertSame ($ route , $ navItem ->getRoute ());
126126 }
127127
128128 public function testGetLink ()
@@ -171,7 +171,7 @@ public function testFromRoute()
171171 $ route = new Route (new MarkdownPage ());
172172 $ item = NavItem::forRoute ($ route );
173173
174- $ this ->assertSame ($ route , $ item ->getDestination ());
174+ $ this ->assertSame ($ route , $ item ->getRoute ());
175175 }
176176
177177 public function testToString ()
@@ -185,7 +185,7 @@ public function testForLink()
185185 {
186186 $ item = NavItem::forLink ('foo ' , 'bar ' );
187187
188- $ this ->assertEquals (new ExternalRoute ('foo ' ), $ item ->getDestination ());
188+ $ this ->assertEquals (new ExternalRoute ('foo ' ), $ item ->getRoute ());
189189 $ this ->assertSame ('bar ' , $ item ->getLabel ());
190190 $ this ->assertSame (500 , $ item ->getPriority ());
191191 }
@@ -200,7 +200,7 @@ public function testForRoute()
200200 $ route = Routes::get ('404 ' );
201201 $ item = NavItem::forRoute ($ route , 'foo ' );
202202
203- $ this ->assertSame ($ route , $ item ->getDestination ());
203+ $ this ->assertSame ($ route , $ item ->getRoute ());
204204 $ this ->assertSame ('foo ' , $ item ->getLabel ());
205205 $ this ->assertSame (999 , $ item ->getPriority ());
206206 }
@@ -210,7 +210,7 @@ public function testForIndexRoute()
210210 $ route = Routes::get ('index ' );
211211 $ item = NavItem::forRoute ($ route , 'foo ' );
212212
213- $ this ->assertSame ($ route , $ item ->getDestination ());
213+ $ this ->assertSame ($ route , $ item ->getRoute ());
214214 $ this ->assertSame ('foo ' , $ item ->getLabel ());
215215 $ this ->assertSame (0 , $ item ->getPriority ());
216216 }
0 commit comments