function DiffArrayTest::setUp
Overrides UnitTestCase::setUp
File
- 
              core/tests/ Drupal/ Tests/ Core/ Common/ DiffArrayTest.php, line 34 
Class
- DiffArrayTest
- Tests the DiffArray helper class.
Namespace
Drupal\Tests\Core\CommonCode
protected function setUp() : void {
  parent::setUp();
  $this->array1 = [
    'same' => 'yes',
    'different' => 'no',
    'array_empty_diff' => [],
    'null' => NULL,
    'int_diff' => 1,
    'array_diff' => [
      'same' => 'same',
      'array' => [
        'same' => 'same',
      ],
    ],
    'array_compared_to_string' => [
      'value',
    ],
    'string_compared_to_array' => 'value',
    'new' => 'new',
  ];
  $this->array2 = [
    'same' => 'yes',
    'different' => 'yes',
    'array_empty_diff' => [],
    'null' => NULL,
    'int_diff' => '1',
    'array_diff' => [
      'same' => 'different',
      'array' => [
        'same' => 'same',
      ],
    ],
    'array_compared_to_string' => 'value',
    'string_compared_to_array' => [
      'value',
    ],
  ];
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
