Commit b9045f6f authored by alexpott's avatar alexpott

Issue #2429157 by root_brute, joshi.rohit100, rpayanm, rteijeiro, hussainweb,...

Issue #2429157 by root_brute, joshi.rohit100, rpayanm, rteijeiro, hussainweb, sidharthap: Remove TypedConfigInterface::set()
parent 88dbc387
...@@ -98,18 +98,6 @@ public function get($name) { ...@@ -98,18 +98,6 @@ public function get($name) {
} }
} }
/**
* {@inheritdoc}
*/
public function set($key, $value) {
$this->value[$key] = $value;
// Parsed elements must be rebuilt with new values
unset($this->elements);
// Directly notify ourselves.
$this->onChange($key, $value);
return $this;
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -53,18 +53,6 @@ public function getElements(); ...@@ -53,18 +53,6 @@ public function getElements();
*/ */
public function get($name); public function get($name);
/**
* Replaces the item at the specified position in this list.
*
* @param int|string $key
* Property name or index of the item to replace.
* @param mixed $value
* Value to be stored at the specified position.
*
* @return $this
*/
public function set($key, $value);
/** /**
* Returns an array of all property values. * Returns an array of all property values.
* *
......
...@@ -315,13 +315,6 @@ function testSchemaData() { ...@@ -315,13 +315,6 @@ function testSchemaData() {
$this->assertTrue(!$effect['data']->isEmpty() && $effect['id']->getValue() == 'image_scale', 'Got data for the image scale effect from metadata.'); $this->assertTrue(!$effect['data']->isEmpty() && $effect['id']->getValue() == 'image_scale', 'Got data for the image scale effect from metadata.');
$this->assertTrue($effect['data']->get('width') instanceof IntegerInterface, 'Got the right type for the scale effect width.'); $this->assertTrue($effect['data']->get('width') instanceof IntegerInterface, 'Got the right type for the scale effect width.');
$this->assertEqual($effect['data']->get('width')->getValue(), 480, 'Got the right value for the scale effect width.' ); $this->assertEqual($effect['data']->get('width')->getValue(), 480, 'Got the right value for the scale effect width.' );
// Finally update some object using a configuration wrapper.
$new_slogan = 'Site slogan for testing configuration metadata';
$wrapper = \Drupal::service('config.typed')->get('system.site');
$wrapper->set('slogan', $new_slogan);
$site_slogan = $wrapper->get('slogan');
$this->assertEqual($site_slogan->getValue(), $new_slogan, 'Successfully updated the contained configuration data');
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment