function ColorUnitTestCase::setUp

Set up the test environment.

Overrides DrupalUnitTestCase::setUp

File

modules/color/color.test, line 156

Class

ColorUnitTestCase
Unit tests for the color.module

Code

public function setUp() {
    drupal_load('module', 'color');
    parent::setUp();
    $this->test_values = array(
        array(
            array(
                0.2,
                0.4,
                0.8,
            ),
            TRUE,
            '#3366cc',
        ),
        array(
            array(
                51,
                102,
                204,
            ),
            FALSE,
            '#3366cc',
        ),
        array(
            array(
                6,
                120,
                190,
            ),
            FALSE,
            '#0678be',
        ),
        array(
            array(
                192,
                192,
                192,
            ),
            FALSE,
            '#c0c0c0',
        ),
        array(
            array(
                255,
                255,
                0,
            ),
            FALSE,
            '#ffff00',
        ),
        array(
            array(
                128,
                0,
                128,
            ),
            FALSE,
            '#800080',
        ),
        array(
            array(
                0.6,
                0.8,
                1,
            ),
            TRUE,
            '#99ccff',
        ),
        array(
            array(
                221,
                72,
                20,
            ),
            FALSE,
            '#dd4814',
        ),
    );
}

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