function ConfigTest::testMerge

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testMerge()
  2. 8.9.x core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testMerge()
  3. 10 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testMerge()

@covers ::merge @dataProvider mergeDataProvider

File

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

Class

ConfigTest
Tests the Config.

Namespace

Drupal\Tests\Core\Config

Code

public function testMerge($data, $data_to_merge, $merged_data) : void {
    // Set initial data.
    $this->config
        ->setData($data);
    // Data to merge.
    $this->config
        ->merge($data_to_merge);
    // Check that data has merged correctly.
    $this->assertEquals($merged_data, $this->config
        ->getRawData());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.