function TableTest::testThemeTableWithNoStriping in Zircon Profile 8
Same name in this branch
- 8 core/modules/system/src/Tests/Theme/TableTest.php \Drupal\system\Tests\Theme\TableTest::testThemeTableWithNoStriping()
- 8 core/modules/system/src/Tests/Render/Element/TableTest.php \Drupal\system\Tests\Render\Element\TableTest::testThemeTableWithNoStriping()
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Theme/TableTest.php \Drupal\system\Tests\Theme\TableTest::testThemeTableWithNoStriping()
Tests that the 'no_striping' option works correctly.
File
- core/
modules/ system/ src/ Tests/ Theme/ TableTest.php, line 112 - Contains \Drupal\system\Tests\Theme\TableTest.
Class
- TableTest
- Tests built-in table theme functions.
Namespace
Drupal\system\Tests\ThemeCode
function testThemeTableWithNoStriping() {
$rows = array(
array(
'data' => array(
1,
),
'no_striping' => TRUE,
),
);
$table = array(
'#type' => 'table',
'#rows' => $rows,
);
$this
->render($table);
$this
->assertNoRaw('class="odd"', 'Odd/even classes were not added because $no_striping = TRUE.');
$this
->assertNoRaw('no_striping', 'No invalid no_striping HTML attribute was printed.');
}