summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r--modules/simpletest/tests/theme.test15
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.'));
}
+
}
/**