You are here

function ArrayDiffUnitTest::setUp in Drupal 7

Sets up unit test environment.

Unlike DrupalWebTestCase::setUp(), DrupalUnitTestCase::setUp() does not install modules because tests are performed without accessing the database. Any required files must be explicitly included by the child class setUp() method.

Overrides DrupalUnitTestCase::setUp

File

modules/simpletest/tests/common.test, line 3179
Tests for common.inc functionality.

Class

ArrayDiffUnitTest
Test array diff functions.

Code

function setUp() {
  parent::setUp();
  $this->array1 = array(
    'same' => 'yes',
    'different' => 'no',
    'array_empty_diff' => array(),
    'null' => NULL,
    'int_diff' => 1,
    'array_diff' => array(
      'same' => 'same',
      'array' => array(
        'same' => 'same',
      ),
    ),
    'array_compared_to_string' => array(
      'value',
    ),
    'string_compared_to_array' => 'value',
    'new' => 'new',
  );
  $this->array2 = array(
    'same' => 'yes',
    'different' => 'yes',
    'array_empty_diff' => array(),
    'null' => NULL,
    'int_diff' => '1',
    'array_diff' => array(
      'same' => 'different',
      'array' => array(
        'same' => 'same',
      ),
    ),
    'array_compared_to_string' => 'value',
    'string_compared_to_array' => array(
      'value',
    ),
  );
}