Skip to content
Snippets Groups Projects
Commit 5719e7e7 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1789722 by andypost, tim.plunkett: Fixed ConfigStorageController::save.

parent b10ff432
No related branches found
No related tags found
No related merge requests found
......@@ -284,13 +284,13 @@ public function save(EntityInterface $entity) {
}
if (!$config->isNew()) {
$return = SAVED_NEW;
$return = SAVED_UPDATED;
$config->save();
$this->postSave($entity, TRUE);
$this->invokeHook('update', $entity);
}
else {
$return = SAVED_UPDATED;
$return = SAVED_NEW;
$config->save();
$entity->enforceIsNew(FALSE);
$this->postSave($entity, FALSE);
......
......@@ -45,7 +45,8 @@ function testCRUD() {
);
$this->drupalPost('admin/structure/config_test/add', $edit, 'Save');
$this->assertResponse(200);
$this->assertText($label1);
$message_insert = format_string('%label configuration has been created.', array('%label' => $label1));
$this->assertRaw($message_insert);
// Update the configuration entity.
$this->assertLinkByHref('admin/structure/config_test/manage/' . $id);
......@@ -54,8 +55,9 @@ function testCRUD() {
);
$this->drupalPost('admin/structure/config_test/manage/' . $id, $edit, 'Save');
$this->assertResponse(200);
$this->assertNoText($label1);
$this->assertText($label2);
$message_update = format_string('%label configuration has been updated.', array('%label' => $label2));
$this->assertNoRaw($message_insert);
$this->assertRaw($message_update);
// Delete the configuration entity.
$this->assertLinkByHref('admin/structure/config_test/manage/' . $id . '/delete');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment