Skip to content

Commit

Permalink
add group test
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Jan 25, 2024
1 parent c1faa76 commit c11af73
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Navigation/NavigationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ public function test_a_naviagation_location_has_items(): void
$this->assertEmpty($location->all());
}

public function test_a_naviagation_location_has_groups(): void
{
$location = $this->registry->location('sidebar');

$location->new('/dashboard', 'Dashboard')->group('General');
$location->new('/posts', 'Posts')->group('Blog');

$this->assertSame(
['General', 'Blog'],
array_keys($location->groups())
);
}

public function test_a_naviagation_item_has_items(): void
{
$location = $this->registry->location('sidebar');
Expand Down

0 comments on commit c11af73

Please sign in to comment.