function TableTest::testThemeTableHeaderCellOption in Zircon Profile 8
Same name in this branch
- 8 core/modules/system/src/Tests/Theme/TableTest.php \Drupal\system\Tests\Theme\TableTest::testThemeTableHeaderCellOption()
- 8 core/modules/system/src/Tests/Render/Element/TableTest.php \Drupal\system\Tests\Render\Element\TableTest::testThemeTableHeaderCellOption()
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Theme/TableTest.php \Drupal\system\Tests\Theme\TableTest::testThemeTableHeaderCellOption()
Tests that the 'header' option in cells works correctly.
File
- core/
modules/ system/ src/ Tests/ Theme/ TableTest.php, line 153 - Contains \Drupal\system\Tests\Theme\TableTest.
Class
- TableTest
- Tests built-in table theme functions.
Namespace
Drupal\system\Tests\ThemeCode
function testThemeTableHeaderCellOption() {
$rows = array(
array(
array(
'data' => 1,
'header' => TRUE,
),
array(
'data' => 1,
'header' => FALSE,
),
array(
'data' => 1,
),
),
);
$table = array(
'#type' => 'table',
'#rows' => $rows,
);
$this
->render($table);
$this
->removeWhiteSpace();
$this
->assertRaw('<th>1</th><td>1</td><td>1</td>', 'The th and td tags was printed correctly.');
}