Skip to content

Commit 282d1fe

Browse files
committed
Refactor test to use fluent assertions
1 parent c3d756e commit 282d1fe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ public function testComponentDoesNotHaveCurrentAttributesWhenCurrentRouteDoesNot
6868

6969
public function testComponentIsCurrentWhenCurrentRouteMatches()
7070
{
71-
$this->mockRoute(Routes::get('index'));
72-
$this->assertStringContainsString('current', $this->render(NavItem::forRoute(Routes::get('index'), 'Home')));
71+
$this->mockCurrentPage('foo');
72+
$this->testView()
73+
->assertSee('current')
74+
->assertAttributeIs('aria-current', 'page');
7375
}
7476

7577
public function testComponentHasAriaCurrentWhenCurrentRouteMatches()

0 commit comments

Comments
 (0)