function ConfigTest::testInitWithData
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testInitWithData()
- 10 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testInitWithData()
- 11.x core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest::testInitWithData()
@covers ::initWithData @dataProvider nestedDataProvider
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ ConfigTest.php, line 288
Class
- ConfigTest
- Tests the Config.
Namespace
Drupal\Tests\Core\ConfigCode
public function testInitWithData($data) {
$config = $this->config
->initWithData($data);
// Should return the Config object.
$this->assertInstanceOf('\\Drupal\\Core\\Config\\Config', $config);
// Check config is not new.
$this->assertEquals(FALSE, $this->config
->isNew());
// Check that data value was set correctly.
$this->assertConfigDataEquals($data);
// Check that original data was set.
$this->assertOriginalConfigDataEquals($data, TRUE);
// Check without applying overrides.
$this->assertOriginalConfigDataEquals($data, FALSE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.