You are here

protected function ConfigMergerTest::getAssociativeStates in Config Merge 8

Provides associative 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::getAssociativeStates()
ConfigMergerTest::statesProvider in tests/src/Unit/ConfigMergerTest.php
Provides data to ::testMergeConfigItemStates().

File

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

Class

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

Namespace

Drupal\Tests\config_merge\Unit

Code

protected function getAssociativeStates() {
  $previous = [
    'first' => 1,
    'second' => [
      'one',
      'two',
    ],
    'third' => [
      'one' => 'first',
      'two' => 'second',
    ],
    'fourth' => 'fourth',
  ];
  $current = $previous;
  $active = $previous;
  $active['fifth'] = 'fifth';
  return [
    $previous,
    $current,
    $active,
  ];
}