You are here

public function ConfigTest::mergeDataProvider in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::mergeDataProvider()

Provides data to test merges.

See also

\Drupal\Tests\Core\Config\ConfigTest::testMerge()

File

core/tests/Drupal/Tests/Core/Config/ConfigTest.php, line 397

Class

ConfigTest
Tests the Config.

Namespace

Drupal\Tests\Core\Config

Code

public function mergeDataProvider() {
  return [
    [
      // Data.
      [
        'a' => 1,
        'b' => 2,
        'c' => [
          'd' => 3,
        ],
      ],
      // Data to merge.
      [
        'a' => 2,
        'e' => 4,
        'c' => [
          'f' => 5,
        ],
      ],
      // Data merged.
      [
        'a' => 2,
        'b' => 2,
        'c' => [
          'd' => 3,
          'f' => 5,
        ],
        'e' => 4,
      ],
    ],
  ];
}