1 common.test ArrayDiffUnitTest::setUp()

Sets up unit test environment.

Unlike BackdropWebTestCase::setUp(), BackdropUnitTestCase::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 BackdropUnitTestCase::setUp

File

core/modules/simpletest/tests/common.test, line 3407
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'),
  );
}