1.20.x common.test CommonBackdropArrayUnitTest::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

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

Class

CommonBackdropArrayUnitTest
Tests the various backdrop_array_* helper functions.

Code

function setUp() {
  parent::setUp();

  // Create a form structure with a nested element.
  $this->form['fieldset']['element'] = array(
    '#value' => 'Nested element',
  );

  // Set up parent array.
  $this->parents = array('fieldset', 'element');
}