You are here

public function ConfigTest::mergeDataProvider in Drupal 9

Same name and namespace in other branches
  1. 8 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 401

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,
      ],
    ],
  ];
}