File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/framework/tests/Unit Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,12 @@ public function testPassingRouteInstanceToConstructorUsesRouteInstance()
5151 $ this ->assertEquals ($ route , (new NavigationItem ($ route , 'Home ' ))->getPage ()->getRoute ());
5252 }
5353
54- public function testPassingRouteKeyToConstructorUsesDestinationAsLink ()
54+ public function testPassingRouteKeyToConstructorUsesDestinationAsRoute ()
5555 {
5656 $ item = new NavigationItem ('index ' , 'Home ' );
57- $ this ->assertNull ($ item ->getPage ());
58- $ this ->assertSame ('index ' , $ item ->getLink ());
57+ $ this ->assertSame (Routes::get ('index ' )->getPage (), $ item ->getPage ());
58+ $ this ->assertSame ('index ' , $ item ->getPage ()->getRouteKey ());
59+ $ this ->assertSame ('index.html ' , $ item ->getLink ());
5960 }
6061
6162 public function testPassingUrlToConstructorSetsRouteToNull ()
You can’t perform that action at this time.
0 commit comments