Mocking Settings (settings.php) within Unit tests
At first glance Settings appears to be read-only, however the constructor is quite forgiving in its parameters. We can construct a fake settings structure like so:
$site_settings = [
  'http_services_api' =&gt; [
    'auth_services' =&gt; [
      'title' =&gt; 'Auth Services',
      'config' =&gt; [
        'base_uri' =&gt; 'https://demo.api-platform.com/auth'
      ],
    ],
    'resource_services' =&gt; [
      'title' =&gt; 'Resource Services',
      'config' =&gt; [
        'base_uri' =&gt; 'https://demo.api-platform.com/books'
      ],
    ],
  ],
];

new Settings($site_settings);

This is alluded too here but never fully described.
Edit: I have added an example to the docs linked.