'#type' => 'table',
'#header' =>
$header,
'#rows' =>
[],
'#empty' => 'Empty row.',
];
// Enable the Starterkit theme.
\Drupal::
service('theme_installer'
)->
install(['starterkit_theme'
]);
$this->
config('system.theme'
)->
set('default', 'starterkit_theme'
)->
save();
$this->
render($table);
$this->
removeWhiteSpace();
$this->
assertRaw('<thead><tr><th>Header 1</th><th colspan="2">Header 2</th></tr>', 'Table header found.'
);
$this->
assertRaw('<tr class="odd"><td colspan="3" class="empty message">Empty row.</td>', 'Colspan on #empty row found.'
);
} /**
* Tests that the 'no_striping' option works correctly.
*/
public function testThemeTableWithNoStriping() { $rows =
[ [ 'data' =>
[1
],