function ThemeTableTestCase::testThemeTableWithNoStriping

Tests that the 'no_striping' option works correctly.

File

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

Class

ThemeTableTestCase
Unit tests for theme_table().

Code

function testThemeTableWithNoStriping() {
    $rows = array(
        array(
            'data' => array(
                1,
            ),
            'no_striping' => TRUE,
        ),
    );
    $this->content = theme('table', array(
        'rows' => $rows,
    ));
    $this->assertNoRaw('class="odd"', 'Odd/even classes were not added because $no_striping = TRUE.');
    $this->assertNoRaw('no_striping', 'No invalid no_striping HTML attribute was printed.');
}

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