xdgEnvironmentOverride top-level property

  1. @visibleForTesting
EnvironmentAccessor? xdgEnvironmentOverride

A testing getter that returns the current value of the override that replaces the real environment lookups with an override.

Only available to tests.

Implementation

@visibleForTesting
EnvironmentAccessor? get xdgEnvironmentOverride => _xdgEnvironmentOverride;
  1. @visibleForTesting
void xdgEnvironmentOverride=(EnvironmentAccessor? override)

A testing setter that replaces the real environment lookups with an override.

Set to null to stop overriding.

Only available to tests.

Implementation

@visibleForTesting
set xdgEnvironmentOverride(EnvironmentAccessor? override) {
  _xdgEnvironmentOverride = override;
  _getenv = _xdgEnvironmentOverride ?? _productionGetEnv;
}