Skip to content

Commit

Permalink
Add additional unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 23, 2024
1 parent 04aa0f6 commit d0ef005
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ public function testGetActiveGroupIsNullWhenNoGroupsExist()
$this->assertNull((new DocumentationSidebar([new NavigationItem('foo', 'Foo')]))->getActiveGroup());
}

public function testGetActiveGroupIsNullIfTheSetGroupIsNotPresentInTheSidebarItems()
{
$this->renderData->setPage(new DocumentationPage('foo', ['navigation.group' => 'foo']));
$this->assertNull($this->createSidebar()->getActiveGroup());
}

public function testGetActiveGroupReturnsFirstGroupWhenRenderingIndexPage()
{
$this->renderData->setPage(new DocumentationPage('index'));
Expand Down

0 comments on commit d0ef005

Please sign in to comment.