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
@@ -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')),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user