getEditable('system.site') ->set('mail', 'profile-testing-site-config@example.com') ->save(TRUE); // Set the time zone to something that is not the system timezone (which is // Australia/Sydney in the testing environment). \Drupal::configFactory()->getEditable('system.date') ->set('timezone.default', 'America/Los_Angeles') ->save(TRUE); }