Replace MockCache with Cache.test() (#66946)

This commit is contained in:
Jenn Magder
2020-09-30 14:53:57 -07:00
committed by GitHub
parent f800a67ee4
commit becaf4913f
17 changed files with 340 additions and 273 deletions

View File

@@ -4,6 +4,7 @@
import 'dart:async';
import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/device.dart';
/// A fake implementation of the [DeviceLogReader].
@@ -40,3 +41,22 @@ class FakeDeviceLogReader extends DeviceLogReader {
await _linesController.close();
}
}
/// Environment with DYLD_LIBRARY_PATH=/path/to/libraries
class FakeDyldEnvironmentArtifact extends ArtifactSet {
FakeDyldEnvironmentArtifact() : super(DevelopmentArtifact.iOS);
@override
Map<String, String> get environment => <String, String>{
'DYLD_LIBRARY_PATH': '/path/to/libraries'
};
@override
Future<bool> isUpToDate() => Future<bool>.value(true);
@override
String get name => 'fake';
@override
Future<void> update(ArtifactUpdater artifactUpdater) async {
}
}