You are here

protected function ConfigMergerTest::getIndexedStates in Config Merge 8

Provides indexed data for previous, current, and active states.

Return value

array An array of three arrays representing previous, current, and active states of a piece of configuration.

1 call to ConfigMergerTest::getIndexedStates()
ConfigMergerTest::statesProvider in tests/src/Unit/ConfigMergerTest.php
Provides data to ::testMergeConfigItemStates().

File

tests/src/Unit/ConfigMergerTest.php, line 63

Class

ConfigMergerTest
@coversDefaultClass \Drupal\config_merge\ConfigMerger @group config_merge

Namespace

Drupal\Tests\config_merge\Unit

Code

protected function getIndexedStates() {
  $previous = [
    0 => 1,
    1 => [
      'one',
      'two',
    ],
    2 => [
      'one' => 'first',
      'two' => 'second',
    ],
    3 => 'fourth',
  ];
  $current = $previous;
  $active = $previous;
  return [
    $previous,
    $current,
    $active,
  ];
}