assertInstanceOf( CitizenComponent::class, $mainMenu ); } /** * @covers ::getTemplateData */ public function testGetTemplateData( array $sidebarData, array $languageData, bool $isPinned ) { // Create a new CitizenComponentMainMenu object $mainMenu = new CitizenComponentMainMenu( $sidebarData ); // Call the getTemplateData method $templateData = $mainMenu->getTemplateData(); // Assert main menu id $this->assertSame( 'citizen-main-menu', $templateData['id'] ); // Assert the structure and types of expected keys $this->assertIsArray( $templateData['data-portlets-first'] ); $this->assertIsArray( $templateData['array-portlets-rest'] ); // Assert the structure and types of expected keys $this->assertArrayHasKey( 'data-portlets-first', $templateData ); $this->assertArrayHasKey( 'array-portlets-rest', $templateData ); } }