Files
ABSDEV/Modules/Menus/Tests/Feature/MenuEditorTest.php
T
2026-07-27 14:17:30 +01:00

9 lines
487 B
PHP

<?php
use Modules\Menus\Models\Menu;
it('normalises reusable menu items through the navigation service', function (): void {
Menu::query()->create(['name' => 'Primary', 'location' => 'primary', 'enabled' => true, 'items' => [['enabled' => true, 'label' => 'Home', 'url' => '/']]]);
expect(app(\Modules\Stylist\Support\FrontendNavigation::class)->primary())->toHaveCount(1)->and(app(\Modules\Stylist\Support\FrontendNavigation::class)->primary()[0]['label'])->toBe('Home');
});