Skip to content

Commit fd1d7be

Browse files
committed
added navigation group test
1 parent c2a8051 commit fd1d7be

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

tests/DebuggerTest.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,25 @@
1414
->toThrow(Exception::class);
1515
});
1616

17-
it('groups plugin navigation items', function () {});
17+
it('groups plugin navigation items', function () {
18+
$plugin = DebuggerPlugin::make()
19+
->navigationGroup(condition: fn() => true, label: 'Laravel Debuggers');
20+
21+
expect($plugin)->getNavigationGroupLabel()->toBe('Laravel Debuggers');
22+
23+
expect($plugin)->hasNavigationGroup()->toBeTrue();
24+
});
1825

1926
it('customizes telescope navigation', function () {
2027
$plugin = DebuggerPlugin::make()
2128
->horizonNavigation(false)
2229
->pulseNavigation(false)
2330
->telescopeNavigation(
24-
condition: fn () => true,
31+
condition: fn() => true,
2532
label: 'Laravel Telescope',
2633
icon: 'heroicon-o-users',
2734
url: 'telescope/requests',
28-
openInNewTab: fn () => false
35+
openInNewTab: fn() => false
2936
);
3037

3138
expect($plugin->hasHorizon())->toBeFalse();
@@ -48,11 +55,11 @@
4855
->telescopeNavigation(false)
4956
->pulseNavigation(false)
5057
->horizonNavigation(
51-
condition: fn () => true,
58+
condition: fn() => true,
5259
label: 'Laravel Horizon',
5360
icon: 'heroicon-o-users',
5461
url: url('horizon/requests'),
55-
openInNewTab: fn () => false
62+
openInNewTab: fn() => false
5663
);
5764

5865
expect($plugin->hasPulse())->toBeFalse();
@@ -75,11 +82,11 @@
7582
->horizonNavigation(false)
7683
->telescopeNavigation(false)
7784
->pulseNavigation(
78-
condition: fn () => true,
85+
condition: fn() => true,
7986
label: 'Laravel Pulse',
8087
icon: 'heroicon-o-users',
8188
url: 'pulse/requests',
82-
openInNewTab: fn () => false
89+
openInNewTab: fn() => false
8390
);
8491

8592
expect($plugin->hasHorizon())->toBeFalse();

0 commit comments

Comments
 (0)