Skip to content

Commit

Permalink
Remove tests for methods not present in v2
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Apr 30, 2024
1 parent b92841e commit eb81e60
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions packages/framework/tests/Feature/NavigationMenuTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,40 +277,6 @@ public function testCanAddItemsToMainNavigationMenuResolvedFromContainer()
$this->assertSame('Foo', $navigation->getItems()->last()->getLabel());
}

public function testHasDropdownsReturnsTrueWhenGroupIsExplicitlySetInFrontMatter()
{
config(['hyde.navigation.subdirectories' => 'hidden']);

Routes::addRoute((new MarkdownPage('foo', matter: ['navigation.group' => 'test-group']))->getRoute());

$this->assertTrue($this->createNavigationMenu()->hasDropdowns());
}

public function testGetDropdownsReturnsCorrectArrayWhenGroupIsExplicitlySetInFrontMatter()
{
config(['hyde.navigation.subdirectories' => 'hidden']);

Routes::addRoute((new MarkdownPage('foo', matter: ['navigation.group' => 'test-group']))->getRoute());

$menu = $this->createNavigationMenu();
$this->assertCount(1, $menu->getDropdowns());

$this->assertEquals([
DropdownNavItem::fromArray('test-group', [
NavItem::fromRoute((new MarkdownPage('foo'))->getRoute()),
]),
], $menu->getDropdowns());
}

public function testHasDropdownsReturnsFalseWhenGroupIsNotExplicitlySetInFrontMatter()
{
config(['hyde.navigation.subdirectories' => 'hidden']);

Routes::addRoute((new MarkdownPage('foo'))->getRoute());
$menu = $this->createNavigationMenu();
$this->assertFalse($menu->hasDropdowns());
}

protected function createNavigationMenu(): MainNavigationMenu
{
return NavigationMenuGenerator::handle(MainNavigationMenu::class);
Expand Down

0 comments on commit eb81e60

Please sign in to comment.