Avoid accidental overwrites of original configuration
Closed this issue · 0 comments
jonathanjfshaw commented
From #182:
+ $config = \Drupal::configFactory()->getEditable('system.mail');
+ $data = $config->getRawData();
+
+ // Save the original values for restoration after.
+ $this->originalConfiguration['system.mail'] = $data;
If startCollectingMail is called twice before stopCollectingMail is called (and I think this might happen in the parrallel behat extension PR), then test_mail_collector will end up being stored in $originalConfiguration and persisted.
Therefore we should not overwrite values in originalConfiguration.