You are here

protected function ConfigSyncMergerTest::getStates in Configuration Synchronizer 8

Provides default 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 ConfigSyncMergerTest::getStates()
ConfigSyncMergerTest::statesProvider in tests/src/Unit/ConfigSyncMergerTest.php
Provides data to ::testMergeConfigItemStates().

File

tests/src/Unit/ConfigSyncMergerTest.php, line 20

Class

ConfigSyncMergerTest
@coversDefaultClass \Drupal\config_sync\ConfigSyncMerger @group config_sync

Namespace

Drupal\Tests\config_sync\Unit

Code

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