public function ConfigTest::testInitWithData in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 260 - Contains \Drupal\Tests\Core\Config\ConfigTest.
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);
}