From df17569a0443ed474051583f1db0d11f5fbdedae Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 22 Apr 2010 22:33:29 +0000 Subject: - Patch #722978 by Alan D., duellj: invalid header count for empty message in theme_table(). --- modules/simpletest/tests/theme.test | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'modules/simpletest') 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('No strings available.', t('Correct colspan was set on empty message.')); + $this->assertRaw('No strings available.', t('Correct colspan was set on empty message.')); $this->assertRaw('Header 1', t('Table header was printed.')); } + } /** -- cgit v1.2.3