Keeping tests as isolated as possible is often thwarted by hidden global state. This post shows a small XCTestCase extension to make changing global state and restoring the original values during a test a little easier.
paul-samuels.com/blog/2021/02/2…