Add trait for setting temporary config values

Created on 27 May 2024, 7 months ago

Problem/Motivation

Sometimes we want to set config values for a test and restore them afterwards. In fact, we already do this in MailCollectionTrait.

Steps to reproduce

Proposed resolution

  • Add ConfigTrait
  • Move MailCollectionTrait::$originalConfiguration to ConfigTrait
  • Add ::setConfigValues() and ::restoreConfigValues to ConfigTrait
  • Refactor MailCollectionTrait::startMailCollection and MailCollectionTrait::startMailSystemCollection to use ConfigTrait::setConfigValues
  • Refactor MailCollectionTrait::restoreMailSettings to use ConfigTrait::restoreConfigValues

Remaining tasks

Test coverage

User interface changes

API changes

  • Added ConfigTrait
  • MailCollectionTrait now makes use of ConfigTrait

Data model changes

✨ Feature request
Status

Active

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024