FakeLaneContext constructor

FakeLaneContext({
  1. List<String> args = const [],
  2. Map<String, String> env = const {},
  3. bool dryRun = false,
  4. bool verbose = false,
})

Creates a context with fresh fakes.

env defaults to an empty environment rather than the real one, so tests do not depend on the machine they run on.

Implementation

FakeLaneContext({
  List<String> args = const [],
  Map<String, String> env = const {},
  bool dryRun = false,
  bool verbose = false,
}) : this._(
       args: args,
       env: env,
       dryRun: dryRun,
       shell: FakeLaneShell(),
       http: FakeHttp(dryRun: dryRun),
       logger: FakeLaneLogger(verbose: verbose),
       secretsProvider: EnvSecretsProvider(env, dotEnvPath: null),
     );