From 5ed4d6a4ede0325dfd0fa23470f9cdad44e1b4e2 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 8 Feb 2024 21:20:36 +0100 Subject: [PATCH] Boot kernel when trying to get navigation --- packages/framework/src/Foundation/HydeKernel.php | 2 ++ packages/framework/tests/Feature/HydeKernelTest.php | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/framework/src/Foundation/HydeKernel.php b/packages/framework/src/Foundation/HydeKernel.php index cb6097a30cf..5eaf6dea0dd 100644 --- a/packages/framework/src/Foundation/HydeKernel.php +++ b/packages/framework/src/Foundation/HydeKernel.php @@ -115,6 +115,8 @@ public function toArray(): array public function navigation(): NavigationMenu { + $this->needsToBeBooted(); + return $this->navigation; } } diff --git a/packages/framework/tests/Feature/HydeKernelTest.php b/packages/framework/tests/Feature/HydeKernelTest.php index a6c0c912d83..229c2a553ba 100644 --- a/packages/framework/tests/Feature/HydeKernelTest.php +++ b/packages/framework/tests/Feature/HydeKernelTest.php @@ -82,8 +82,6 @@ public function test_has_feature_helper_calls_method_on_features_class() public function test_has_navigation_helper_returns_site_navigation_instance() { - Hyde::boot(); - $this->assertInstanceOf(NavigationMenu::class, Hyde::navigation()); }