commit 0a9caec1fdb633ab51d935078650621777bb96c8 Author: David Valdez Date: Thu Apr 25 03:23:16 2013 -0500 1939008-62 adding tests for header property in cells diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php index c2bae9d..995e93a 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php @@ -81,4 +81,20 @@ function testThemeTableWithNoStriping() { $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.'); } + + /** + * Tests that the 'header' option in cells works correctly + */ + function testThemeTableHeaderCellOption() { + $rows = array( + array( + array('data' => 1, 'header' => TRUE), + array('data' => 1, 'header' => FALSE), + array('data' => 1), + ), + ); + + $this->content = theme('table', array('rows' => $rows)); + $this->assertRaw('111', 'The th and td tags was printed correctly.'); + } }