function TableTest::testThemeTableFooter
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php \Drupal\KernelTests\Core\Render\Element\TableTest::testThemeTableFooter()
- 8.9.x core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php \Drupal\KernelTests\Core\Render\Element\TableTest::testThemeTableFooter()
- 11.x core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php \Drupal\KernelTests\Core\Render\Element\TableTest::testThemeTableFooter()
Tests that the 'footer' option works correctly.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Render/ Element/ TableTest.php, line 112
Class
- TableTest
- Tests built-in table theme functions.
Namespace
Drupal\KernelTests\Core\Render\ElementCode
public function testThemeTableFooter() : void {
$footer = [
[
'data' => [
1,
],
],
[
'Foo',
],
];
$table = [
'#type' => 'table',
'#rows' => [],
'#footer' => $footer,
];
$this->render($table);
$this->removeWhiteSpace();
$this->assertRaw('<tfoot><tr><td>1</td></tr><tr><td>Foo</td></tr></tfoot>', 'Table footer found.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.