function ThemeTableTestCase::testThemeTableFooter in Drupal 7
Test that the 'footer' option works correctly.
File
- modules/
simpletest/ tests/ theme.test, line 245 - Tests for the theme API.
Class
- ThemeTableTestCase
- Unit tests for theme_table().
Code
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.');
}