Skip to content

Commit e15daca

Browse files
committed
Merge branch 'improved-navigation-internals' into clean-up-navigation-view-markup
2 parents 282d1fe + f91e464 commit e15daca

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/testing/src/InteractsWithPages.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,26 @@
1111

1212
trait InteractsWithPages
1313
{
14-
protected function mockRoute(?Route $route = null): void
14+
protected function mockRoute(?Route $route = null): static
1515
{
1616
Render::share('route', $route ?? (new Route(new InMemoryPage())));
17+
18+
return $this;
1719
}
1820

19-
protected function mockPage(?HydePage $page = null, ?string $currentPage = null): void
21+
protected function mockPage(?HydePage $page = null, ?string $currentPage = null): static
2022
{
2123
Render::share('page', $page ?? new InMemoryPage());
2224
Render::share('routeKey', $currentPage ?? 'foo');
25+
26+
return $this;
2327
}
2428

25-
protected function mockCurrentPage(string $currentPage): void
29+
protected function mockCurrentPage(string $currentPage): static
2630
{
2731
Render::share('routeKey', $currentPage);
2832
Render::share('route', new Route(new InMemoryPage($currentPage)));
33+
34+
return $this;
2935
}
3036
}

0 commit comments

Comments
 (0)