1 theme.test | protected ThemeTableUnitTest::testThemeTableFooter() |
Tests that the 'footer' option works correctly.
File
- core/
modules/ simpletest/ tests/ theme.test, line 228 - Tests for the theme API.
Class
- ThemeTableUnitTest
- Unit tests for theme_table().
Code
protected function testThemeTableFooter() {
$footer = array(
array(
'data' => array(1),
),
array('Foo'),
);
$table = array(
'rows' => array(),
'footer' => $footer,
);
$this->content = theme('table', $table);
$this->content = preg_replace('@>\s+<@', '><', $this->content);
$this->assertRaw('<tfoot><tr><td>1</td></tr><tr><td>Foo</td></tr></tfoot>', 'Table footer found.');
}