|
14 | 14 | ->toThrow(Exception::class);
|
15 | 15 | });
|
16 | 16 |
|
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 | +}); |
18 | 25 |
|
19 | 26 | it('customizes telescope navigation', function () {
|
20 | 27 | $plugin = DebuggerPlugin::make()
|
21 | 28 | ->horizonNavigation(false)
|
22 | 29 | ->pulseNavigation(false)
|
23 | 30 | ->telescopeNavigation(
|
24 |
| - condition: fn () => true, |
| 31 | + condition: fn() => true, |
25 | 32 | label: 'Laravel Telescope',
|
26 | 33 | icon: 'heroicon-o-users',
|
27 | 34 | url: 'telescope/requests',
|
28 |
| - openInNewTab: fn () => false |
| 35 | + openInNewTab: fn() => false |
29 | 36 | );
|
30 | 37 |
|
31 | 38 | expect($plugin->hasHorizon())->toBeFalse();
|
|
48 | 55 | ->telescopeNavigation(false)
|
49 | 56 | ->pulseNavigation(false)
|
50 | 57 | ->horizonNavigation(
|
51 |
| - condition: fn () => true, |
| 58 | + condition: fn() => true, |
52 | 59 | label: 'Laravel Horizon',
|
53 | 60 | icon: 'heroicon-o-users',
|
54 | 61 | url: url('horizon/requests'),
|
55 |
| - openInNewTab: fn () => false |
| 62 | + openInNewTab: fn() => false |
56 | 63 | );
|
57 | 64 |
|
58 | 65 | expect($plugin->hasPulse())->toBeFalse();
|
|
75 | 82 | ->horizonNavigation(false)
|
76 | 83 | ->telescopeNavigation(false)
|
77 | 84 | ->pulseNavigation(
|
78 |
| - condition: fn () => true, |
| 85 | + condition: fn() => true, |
79 | 86 | label: 'Laravel Pulse',
|
80 | 87 | icon: 'heroicon-o-users',
|
81 | 88 | url: 'pulse/requests',
|
82 |
| - openInNewTab: fn () => false |
| 89 | + openInNewTab: fn() => false |
83 | 90 | );
|
84 | 91 |
|
85 | 92 | expect($plugin->hasHorizon())->toBeFalse();
|
|
0 commit comments