function ThemeTableTestCase::testThemeTableFooter

Test that the 'footer' option works correctly.

File

modules/simpletest/tests/theme.test, line 245

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.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.