forked from firka/flutter
Bump mockito to 3.0.0-beta (#18462)
* Bump mockito to 3.0.0-beta * Few fixes * fix test * Bump image * Fix * New packages update * With matcher pinned * No more typed
This commit is contained in:
committed by
Alexander Aprelev
parent
bec912165a
commit
9f8a70be4c
@@ -21,7 +21,7 @@ dependencies:
|
||||
|
||||
dev_dependencies:
|
||||
test: 0.12.41
|
||||
mockito: 3.0.0-alpha+5
|
||||
mockito: 3.0.0-beta
|
||||
|
||||
analyzer: 0.31.2-alpha.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
boolean_selector: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@@ -61,4 +61,4 @@ dev_dependencies:
|
||||
web_socket_channel: 1.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 2.1.14 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: 049d
|
||||
# PUBSPEC CHECKSUM: 77d2
|
||||
|
||||
@@ -84,32 +84,32 @@ class FakeProcessManager extends Mock implements ProcessManager {
|
||||
// expected to be called.
|
||||
// TODO(gspencer): make this more general so that any call will be captured.
|
||||
when(start(
|
||||
typed(captureAny),
|
||||
environment: typed(captureAny, named: 'environment'),
|
||||
workingDirectory: typed(captureAny, named: 'workingDirectory'),
|
||||
any,
|
||||
environment: anyNamed('environment'),
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
)).thenAnswer(_nextProcess);
|
||||
|
||||
when(start(typed(captureAny))).thenAnswer(_nextProcess);
|
||||
when(start(any)).thenAnswer(_nextProcess);
|
||||
|
||||
when(run(
|
||||
typed(captureAny),
|
||||
environment: typed(captureAny, named: 'environment'),
|
||||
workingDirectory: typed(captureAny, named: 'workingDirectory'),
|
||||
any,
|
||||
environment: anyNamed('environment'),
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
)).thenAnswer(_nextResult);
|
||||
|
||||
when(run(typed(captureAny))).thenAnswer(_nextResult);
|
||||
when(run(any)).thenAnswer(_nextResult);
|
||||
|
||||
when(runSync(
|
||||
typed(captureAny),
|
||||
environment: typed(captureAny, named: 'environment'),
|
||||
workingDirectory: typed(captureAny, named: 'workingDirectory')
|
||||
any,
|
||||
environment: anyNamed('environment'),
|
||||
workingDirectory: anyNamed('workingDirectory')
|
||||
)).thenAnswer(_nextResultSync);
|
||||
|
||||
when(runSync(typed(captureAny))).thenAnswer(_nextResultSync);
|
||||
when(runSync(any)).thenAnswer(_nextResultSync);
|
||||
|
||||
when(killPid(typed(captureAny), typed(captureAny))).thenReturn(true);
|
||||
when(killPid(any, any)).thenReturn(true);
|
||||
|
||||
when(canRun(captureAny, workingDirectory: typed(captureAny, named: 'workingDirectory')))
|
||||
when(canRun(any, workingDirectory: anyNamed('workingDirectory')))
|
||||
.thenReturn(true);
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ class FakeProcess extends Mock implements Process {
|
||||
final int desiredExitCode;
|
||||
|
||||
void _setupMock() {
|
||||
when(kill(typed(captureAny))).thenReturn(true);
|
||||
when(kill(any)).thenReturn(true);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -142,9 +142,9 @@ void main() {
|
||||
await creator.createArchive();
|
||||
expect(
|
||||
verify(processManager.start(
|
||||
typed(captureAny),
|
||||
workingDirectory: typed(captureAny, named: 'workingDirectory'),
|
||||
environment: typed(captureAny, named: 'environment'),
|
||||
captureAny,
|
||||
workingDirectory: captureAnyNamed('workingDirectory'),
|
||||
environment: captureAnyNamed('environment'),
|
||||
)).captured[2]['PUB_CACHE'],
|
||||
endsWith(path.join('flutter', '.pub-cache')),
|
||||
);
|
||||
|
||||
@@ -13,7 +13,7 @@ dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
mockito: 3.0.0-alpha+5
|
||||
mockito: 3.0.0-beta
|
||||
|
||||
analyzer: 0.31.2-alpha.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
args: 1.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@@ -66,4 +66,4 @@ dev_dependencies:
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# PUBSPEC CHECKSUM: 3f92
|
||||
# PUBSPEC CHECKSUM: 8dc7
|
||||
|
||||
@@ -11,12 +11,12 @@ MockHttpClient createMockImageHttpClient(SecurityContext _) {
|
||||
final MockHttpClientRequest request = new MockHttpClientRequest();
|
||||
final MockHttpClientResponse response = new MockHttpClientResponse();
|
||||
final MockHttpHeaders headers = new MockHttpHeaders();
|
||||
when(client.getUrl(typed(any))).thenAnswer((_) => new Future<HttpClientRequest>.value(request));
|
||||
when(client.getUrl(any)).thenAnswer((_) => new Future<HttpClientRequest>.value(request));
|
||||
when(request.headers).thenReturn(headers);
|
||||
when(request.close()).thenAnswer((_) => new Future<HttpClientResponse>.value(response));
|
||||
when(response.contentLength).thenReturn(kTransparentImage.length);
|
||||
when(response.statusCode).thenReturn(HttpStatus.ok);
|
||||
when(response.listen(typed(any))).thenAnswer((Invocation invocation) {
|
||||
when(response.listen(any)).thenAnswer((Invocation invocation) {
|
||||
final void Function(List<int>) onData = invocation.positionalArguments[0];
|
||||
final void Function() onDone = invocation.namedArguments[#onDone];
|
||||
final void Function(Object, [StackTrace]) onError = invocation.namedArguments[#onError];
|
||||
@@ -32,4 +32,4 @@ class MockHttpClientRequest extends Mock implements HttpClientRequest {}
|
||||
|
||||
class MockHttpClientResponse extends Mock implements HttpClientResponse {}
|
||||
|
||||
class MockHttpHeaders extends Mock implements HttpHeaders {}
|
||||
class MockHttpHeaders extends Mock implements HttpHeaders {}
|
||||
|
||||
@@ -24,7 +24,7 @@ dependencies:
|
||||
|
||||
dev_dependencies:
|
||||
test: 0.12.41
|
||||
mockito: 3.0.0-alpha+5
|
||||
mockito: 3.0.0-beta
|
||||
|
||||
analyzer: 0.31.2-alpha.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
boolean_selector: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@@ -62,4 +62,4 @@ dev_dependencies:
|
||||
web_socket_channel: 1.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 2.1.14 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: 5d71
|
||||
# PUBSPEC CHECKSUM: d9a6
|
||||
|
||||
Reference in New Issue
Block a user