Skip to content

Commit d5f33f6

Browse files
committed
Test component resolves relative links for routes
1 parent 2cd3da2 commit d5f33f6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/framework/tests/Unit/Views/NavigationLinkViewTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ public function testComponentLinksToRouteDestination()
5353
$this->testView()->assertAttributeIs('href', 'foo.html');
5454
}
5555

56+
public function testComponentResolvesRelativeLinksForRoutes()
57+
{
58+
$this->mockCurrentPage('foo/bar');
59+
$this->testView($this->makeNavItemForPage())->assertAttributeIs('href', '../foo.html');
60+
}
61+
5662
public function testComponentUsesTitle()
5763
{
5864
$this->testView()->assertTextIs('Foo');

0 commit comments

Comments
 (0)