Add mirror overrides to doctor output (#56928)
This commit is contained in:
@@ -35,6 +35,7 @@ import '../../src/testbed.dart';
|
||||
|
||||
final Generator _kNoColorOutputPlatform = () => FakePlatform(
|
||||
localeName: 'en_US.UTF-8',
|
||||
environment: <String, String>{},
|
||||
stdoutSupportsAnsi: false,
|
||||
);
|
||||
|
||||
@@ -588,6 +589,24 @@ void main() {
|
||||
Platform: _kNoColorOutputPlatform,
|
||||
FlutterVersion: () => mockFlutterVersion,
|
||||
});
|
||||
|
||||
testUsingContext('shows mirrors', () async {
|
||||
(globals.platform as FakePlatform).environment = <String, String>{
|
||||
'PUB_HOSTED_URL': 'https://example.com/pub',
|
||||
'FLUTTER_STORAGE_BASE_URL': 'https://example.com/flutter',
|
||||
};
|
||||
|
||||
expect(await FlutterValidatorDoctor(logger).diagnose(verbose: true), isTrue);
|
||||
expect(logger.statusText, contains('Pub download mirror https://example.com/pub'));
|
||||
expect(logger.statusText, contains('Flutter download mirror https://example.com/flutter'));
|
||||
}, overrides: <Type, Generator>{
|
||||
Artifacts: () => mockArtifacts,
|
||||
FileSystem: () => memoryFileSystem,
|
||||
OutputPreferences: () => OutputPreferences(wrapText: false),
|
||||
ProcessManager: () => mockProcessManager,
|
||||
Platform: _kNoColorOutputPlatform,
|
||||
FlutterVersion: () => mockFlutterVersion,
|
||||
});
|
||||
});
|
||||
|
||||
testUsingContext('validate non-verbose output wrapping', () async {
|
||||
|
||||
Reference in New Issue
Block a user