public function ConfigTest::testInitWithData in Drupal 8
Same name and namespace in other branches
- 9 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()
@covers ::initWithData @dataProvider nestedDataProvider
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ ConfigTest.php, line 281
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);
}