diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-03-18 19:03:29 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-03-18 19:03:29 +0000 |
commit | cb009a324e86e1bd4ab4d421881ab96f9077906a (patch) | |
tree | 9952a9895f070eac45a79f9a6f3114ab8f6a4141 /modules/simpletest | |
parent | 224243b8173b9a75b45072ee81f97601fba83d3c (diff) | |
download | brdo-cb009a324e86e1bd4ab4d421881ab96f9077906a.tar.gz brdo-cb009a324e86e1bd4ab4d421881ab96f9077906a.tar.bz2 |
- Patch #720202 by naxoc, kkaefer: theme_table() doesn't use thead with empty cells.
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/tests/theme.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test index c46dc9d93..d3ba6f9bb 100644 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -95,6 +95,17 @@ class ThemeTableUnitTest extends DrupalWebTestCase { $this->assertNoRaw('sticky-enabled', t('Table does not have a class of sticky-enabled because $sticky = FALSE.')); drupal_static_reset('drupal_add_js'); } + + /** + * Tests that the table header is printed even if there are no rows. And that + * the empty text is displayed correctly. + */ + function testThemeTableWithEmptyMessage() { + $header = array(t('Header 1'), t('Header 2')); + $this->content = theme('table', array('header' => $header, 'rows' => array(), 'empty' => t('No strings available.'))); + $this->assertRaw('<tr class="odd"><td colspan="2" class="empty message">No strings available.</td>', t('Correct colspan was set on empty message.')); + $this->assertRaw('<thead><tr><th>Header 1</th>', t('Table header was printed.')); + } } /** |