@@ -41,10 +41,10 @@ protected function setUp(): void
4141
4242 public function testConstruct ()
4343 {
44- $ route = new Route ( new MarkdownPage ( ));
45- $ item = new NavigationItem ($ route , 'Test ' , 500 );
46-
47- $ this ->assertSame ( $ route , $ item -> getRoute ( ));
44+ $ this -> assertInstanceOf (NavigationItem::class, new NavigationItem ( ' foo ' , ' Test ' ));
45+ $ this -> assertInstanceOf (NavigationItem::class, new NavigationItem (new Route ( new MarkdownPage ()) , 'Test ' ) );
46+ $ this -> assertInstanceOf (NavigationItem::class, new NavigationItem ( new Route ( new MarkdownPage ()), ' Test ' , 500 ));
47+ $ this ->assertInstanceOf (NavigationItem::class, new NavigationItem ( new Route ( new MarkdownPage ()), ' Test ' , 500 , ' foo ' ));
4848 }
4949
5050 public function testIsInstanceOfNavigationElement ()
@@ -79,6 +79,14 @@ public function testPassingUnknownRouteKeyToConstructorSetsRouteToNull()
7979 $ this ->assertSame ('foo ' , $ item ->getUrl ());
8080 }
8181
82+ public function testCanGetPage ()
83+ {
84+ $ page = new MarkdownPage ();
85+ $ item = new NavigationItem (new Route ($ page ), 'Test ' , 500 );
86+
87+ $ this ->assertSame ($ page , $ item ->getPage ());
88+ }
89+
8290 public function testGetDestination ()
8391 {
8492 $ route = new Route (new InMemoryPage ('foo ' ));
0 commit comments