// Attempt to treat the single value as a nested item.
$this->
expectError();
$this->config->
set('testData.illegalOffset', 1
);
} /**
* @covers ::initWithData
* @dataProvider nestedDataProvider
*/
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.