diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-04-22 22:33:29 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-04-22 22:33:29 +0000 |
commit | df17569a0443ed474051583f1db0d11f5fbdedae (patch) | |
tree | 4b3fad10d63b60258bb853a81ebd8437d6bf9911 /modules/simpletest | |
parent | 9a2c9fee0466bb2aa98df9dd9d5edf21f0cf6896 (diff) | |
download | brdo-df17569a0443ed474051583f1db0d11f5fbdedae.tar.gz brdo-df17569a0443ed474051583f1db0d11f5fbdedae.tar.bz2 |
- Patch #722978 by Alan D., duellj: invalid header count for empty message in theme_table().
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/tests/theme.test | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test index 631d69d5b..cb2a39bb0 100644 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -110,15 +110,22 @@ class ThemeTableUnitTest extends DrupalWebTestCase { } /** - * Tests that the table header is printed even if there are no rows. And that - * the empty text is displayed correctly. + * Tests that the table header is printed correctly even if there are no rows, + * and that the empty text is displayed correctly. */ function testThemeTableWithEmptyMessage() { - $header = array(t('Header 1'), t('Header 2')); + $header = array( + t('Header 1'), + array( + 'data' => t('Header 2'), + 'colspan' => 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('<tr class="odd"><td colspan="3" 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.')); } + } /** |