assertInstanceOf( CitizenComponent::class, $mainMenu ); } /** * @return array[] */ public function provideMainMenuData(): array { return [ [ 'sidebarData' => [ 'data-portlets-first' => [], 'array-portlets-rest' => [], ] ] ]; } /** * @covers ::getTemplateData * @dataProvider provideMainMenuData */ public function testGetTemplateData( array $sidebarData ) { // Create a new CitizenComponentMainMenu object $mainMenu = new CitizenComponentMainMenu( $sidebarData ); // Call the getTemplateData method $templateData = $mainMenu->getTemplateData(); // 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 ); } }