From c11af7397aa1a77cb259c9cd2bfa5395ce06885c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Thu, 25 Jan 2024 10:38:02 +0100 Subject: [PATCH] add group test --- tests/Navigation/NavigationTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Navigation/NavigationTest.php b/tests/Navigation/NavigationTest.php index 0c6ae728..28a55481 100644 --- a/tests/Navigation/NavigationTest.php +++ b/tests/Navigation/NavigationTest.php @@ -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');