function ColorTestCase::setUp

Overrides DrupalWebTestCase::setUp

File

modules/color/color.test, line 24

Class

ColorTestCase
Tests the Color module functionality.

Code

function setUp() {
    parent::setUp('color');
    // Create users.
    $this->big_user = $this->drupalCreateUser(array(
        'administer themes',
    ));
    // This tests the color module in both Bartik and Garland.
    $this->themes = array(
        'bartik' => array(
            'palette_input' => 'palette[bg]',
            'scheme' => 'slate',
            'scheme_color' => '#3b3b3b',
        ),
        'garland' => array(
            'palette_input' => 'palette[link]',
            'scheme' => 'greenbeam',
            'scheme_color' => '#0c7a00',
        ),
    );
    theme_enable(array_keys($this->themes));
    // Array filled with valid and not valid color values
    $this->colorTests = array(
        '#000' => TRUE,
        '#123456' => TRUE,
        '#abcdef' => TRUE,
        '#0' => FALSE,
        '#00' => FALSE,
        '#0000' => FALSE,
        '#00000' => FALSE,
        '123456' => FALSE,
        '#00000g' => FALSE,
    );
}

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