diff -u b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php --- b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php +++ b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php @@ -117,6 +117,25 @@ $class = get_class($e); $this->pass($class . ' thrown upon listing from a non-existing storage bin.'); } + + // Test renaming an object that does not exist throws an exception. + try { + $this->storage->rename('config_test.storage_does_not_exist', 'config_test.storage_does_not_exist_rename'); + } + catch (\Exception $e) { + $class = get_class($e); + $this->pass($class . ' thrown upon renaming a nonexistent storage bin.'); + } + + // Test renaming to an object that already exists throws an exception. + try { + $this->storage->rename('system.cron', 'system.performance'); + } + catch (\Exception $e) { + $class = get_class($e); + $this->pass($class . ' thrown upon renaming a nonexistent storage bin.'); + } + } abstract protected function read($name);