Skip to content

Commit

Permalink
Add a route to populate testing sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 15, 2024
1 parent 3ebd20f commit 2eeed5f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/framework/tests/Unit/Views/SidebarItemsViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

namespace Hyde\Framework\Testing\Unit\Views;

use Hyde\Hyde;
use Hyde\Testing\TestCase;
use Hyde\Support\Models\Route;
use Hyde\Testing\TestsBladeViews;
use Hyde\Pages\DocumentationPage;
use Hyde\Testing\Support\TestView;
use Hyde\Framework\Features\Navigation\DocumentationSidebar;
use Hyde\Framework\Features\Navigation\NavigationMenuGenerator;
Expand All @@ -21,6 +24,8 @@ protected function testView(): TestView
{
$this->mockRoute();

Hyde::routes()->addRoute(new Route(new DocumentationPage('foo')));

return $this->test(view('hyde::components.docs.sidebar-items', [
'sidebar' => NavigationMenuGenerator::handle(DocumentationSidebar::class),
]));
Expand Down

0 comments on commit 2eeed5f

Please sign in to comment.