Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
9236eefd
Unverified
Commit
9236eefd
authored
Feb 11, 2021
by
Jenn Magder
Committed by
GitHub
Feb 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MockPub -> FakePub (#75759)
parent
fb2b98f9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
68 deletions
+71
-68
build_web_test.dart
...er_tools/test/commands.shard/hermetic/build_web_test.dart
+8
-8
resident_web_runner_cold_test.dart
...ols/test/general.shard/resident_web_runner_cold_test.dart
+2
-2
resident_web_runner_test.dart
...er_tools/test/general.shard/resident_web_runner_test.dart
+44
-44
flutter_command_test.dart
...tools/test/general.shard/runner/flutter_command_test.dart
+1
-14
fakes.dart
packages/flutter_tools/test/src/fakes.dart
+16
-0
No files found.
packages/flutter_tools/test/commands.shard/hermetic/build_web_test.dart
View file @
9236eefd
...
@@ -23,6 +23,7 @@ import 'package:mockito/mockito.dart';
...
@@ -23,6 +23,7 @@ import 'package:mockito/mockito.dart';
import
'../../src/common.dart'
;
import
'../../src/common.dart'
;
import
'../../src/context.dart'
;
import
'../../src/context.dart'
;
import
'../../src/fakes.dart'
;
import
'../../src/testbed.dart'
;
import
'../../src/testbed.dart'
;
void
main
(
)
{
void
main
(
)
{
...
@@ -65,7 +66,7 @@ void main() {
...
@@ -65,7 +66,7 @@ void main() {
Platform:
()
=>
fakePlatform
,
Platform:
()
=>
fakePlatform
,
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
true
),
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
true
),
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
});
...
@@ -78,7 +79,7 @@ void main() {
...
@@ -78,7 +79,7 @@ void main() {
Platform:
()
=>
fakePlatform
,
Platform:
()
=>
fakePlatform
,
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
true
),
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
true
),
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
});
...
@@ -93,7 +94,7 @@ void main() {
...
@@ -93,7 +94,7 @@ void main() {
Platform:
()
=>
fakePlatform
,
Platform:
()
=>
fakePlatform
,
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
false
),
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
false
),
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
});
...
@@ -108,7 +109,7 @@ void main() {
...
@@ -108,7 +109,7 @@ void main() {
Platform:
()
=>
fakePlatform
,
Platform:
()
=>
fakePlatform
,
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
true
),
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
true
),
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
BuildSystem:
()
=>
MockBuildSystem
(),
BuildSystem:
()
=>
MockBuildSystem
(),
});
});
...
@@ -119,7 +120,7 @@ void main() {
...
@@ -119,7 +120,7 @@ void main() {
Platform:
()
=>
fakePlatform
,
Platform:
()
=>
fakePlatform
,
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
false
),
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
false
),
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
});
...
@@ -129,7 +130,7 @@ void main() {
...
@@ -129,7 +130,7 @@ void main() {
Platform:
()
=>
fakePlatform
,
Platform:
()
=>
fakePlatform
,
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
true
),
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
true
),
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
});
...
@@ -145,7 +146,7 @@ void main() {
...
@@ -145,7 +146,7 @@ void main() {
Platform:
()
=>
fakePlatform
,
Platform:
()
=>
fakePlatform
,
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
true
),
FeatureFlags:
()
=>
TestFeatureFlags
(
isWebEnabled:
true
),
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
BuildSystem:
()
=>
MockBuildSystem
(),
BuildSystem:
()
=>
MockBuildSystem
(),
});
});
...
@@ -208,7 +209,6 @@ class UrlLauncherPlugin {}
...
@@ -208,7 +209,6 @@ class UrlLauncherPlugin {}
}
}
class
MockBuildSystem
extends
Mock
implements
BuildSystem
{}
class
MockBuildSystem
extends
Mock
implements
BuildSystem
{}
class
MockPub
extends
Mock
implements
Pub
{}
class
TestWebBuildCommand
extends
FlutterCommand
{
class
TestWebBuildCommand
extends
FlutterCommand
{
TestWebBuildCommand
({
bool
verboseHelp
=
false
})
:
TestWebBuildCommand
({
bool
verboseHelp
=
false
})
:
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_cold_test.dart
View file @
9236eefd
...
@@ -27,6 +27,7 @@ import 'package:vm_service/vm_service.dart';
...
@@ -27,6 +27,7 @@ import 'package:vm_service/vm_service.dart';
import
'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'
;
import
'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'
;
import
'../src/common.dart'
;
import
'../src/common.dart'
;
import
'../src/fakes.dart'
;
import
'../src/testbed.dart'
;
import
'../src/testbed.dart'
;
void
main
(
)
{
void
main
(
)
{
...
@@ -58,7 +59,7 @@ void main() {
...
@@ -58,7 +59,7 @@ void main() {
urlTunneller:
null
,
urlTunneller:
null
,
)
as
ResidentWebRunner
;
)
as
ResidentWebRunner
;
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
}
}
);
);
});
});
...
@@ -201,5 +202,4 @@ class MockChromeConnection extends Mock implements ChromeConnection {}
...
@@ -201,5 +202,4 @@ class MockChromeConnection extends Mock implements ChromeConnection {}
class
MockChromeTab
extends
Mock
implements
ChromeTab
{}
class
MockChromeTab
extends
Mock
implements
ChromeTab
{}
class
MockWipConnection
extends
Mock
implements
WipConnection
{}
class
MockWipConnection
extends
Mock
implements
WipConnection
{}
class
MockBuildSystem
extends
Mock
implements
BuildSystem
{}
class
MockBuildSystem
extends
Mock
implements
BuildSystem
{}
class
MockPub
extends
Mock
implements
Pub
{}
class
MockChromiumLauncher
extends
Mock
implements
ChromiumLauncher
{}
class
MockChromiumLauncher
extends
Mock
implements
ChromiumLauncher
{}
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
9236eefd
...
@@ -37,6 +37,7 @@ import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';
...
@@ -37,6 +37,7 @@ import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';
import
'../src/common.dart'
;
import
'../src/common.dart'
;
import
'../src/context.dart'
;
import
'../src/context.dart'
;
import
'../src/fakes.dart'
;
import
'../src/testbed.dart'
;
import
'../src/testbed.dart'
;
const
List
<
VmServiceExpectation
>
kAttachLogExpectations
=
<
VmServiceExpectation
>[
const
List
<
VmServiceExpectation
>
kAttachLogExpectations
=
<
VmServiceExpectation
>[
...
@@ -188,7 +189,7 @@ void main() {
...
@@ -188,7 +189,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -215,7 +216,7 @@ void main() {
...
@@ -215,7 +216,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
testUsingContext
(
'profile does not supportsServiceProtocol'
,
()
{
testUsingContext
(
'profile does not supportsServiceProtocol'
,
()
{
...
@@ -246,7 +247,7 @@ void main() {
...
@@ -246,7 +247,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -275,7 +276,7 @@ void main() {
...
@@ -275,7 +276,7 @@ void main() {
Logger:
()
=>
FakeStatusLogger
(
BufferLogger
.
test
()),
Logger:
()
=>
FakeStatusLogger
(
BufferLogger
.
test
()),
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -295,7 +296,7 @@ void main() {
...
@@ -295,7 +296,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -330,7 +331,7 @@ void main() {
...
@@ -330,7 +331,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -354,7 +355,7 @@ void main() {
...
@@ -354,7 +355,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -374,7 +375,7 @@ void main() {
...
@@ -374,7 +375,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -412,7 +413,7 @@ void main() {
...
@@ -412,7 +413,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -480,7 +481,7 @@ void main() {
...
@@ -480,7 +481,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -506,7 +507,7 @@ void main() {
...
@@ -506,7 +507,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -586,7 +587,7 @@ void main() {
...
@@ -586,7 +587,7 @@ void main() {
Usage:
()
=>
MockFlutterUsage
(),
Usage:
()
=>
MockFlutterUsage
(),
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -670,7 +671,7 @@ void main() {
...
@@ -670,7 +671,7 @@ void main() {
Usage:
()
=>
MockFlutterUsage
(),
Usage:
()
=>
MockFlutterUsage
(),
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -712,7 +713,7 @@ void main() {
...
@@ -712,7 +713,7 @@ void main() {
Usage:
()
=>
MockFlutterUsage
(),
Usage:
()
=>
MockFlutterUsage
(),
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -724,7 +725,7 @@ void main() {
...
@@ -724,7 +725,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -760,7 +761,7 @@ void main() {
...
@@ -760,7 +761,7 @@ void main() {
Usage:
()
=>
MockFlutterUsage
(),
Usage:
()
=>
MockFlutterUsage
(),
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -793,7 +794,7 @@ void main() {
...
@@ -793,7 +794,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -833,7 +834,7 @@ void main() {
...
@@ -833,7 +834,7 @@ void main() {
Usage:
()
=>
MockFlutterUsage
(),
Usage:
()
=>
MockFlutterUsage
(),
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -861,7 +862,7 @@ void main() {
...
@@ -861,7 +862,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -889,7 +890,7 @@ void main() {
...
@@ -889,7 +890,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -902,7 +903,7 @@ void main() {
...
@@ -902,7 +903,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -929,7 +930,7 @@ void main() {
...
@@ -929,7 +930,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -956,7 +957,7 @@ void main() {
...
@@ -956,7 +957,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -983,7 +984,7 @@ void main() {
...
@@ -983,7 +984,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1010,7 +1011,7 @@ void main() {
...
@@ -1010,7 +1011,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1038,7 +1039,7 @@ void main() {
...
@@ -1038,7 +1039,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1079,7 +1080,7 @@ void main() {
...
@@ -1079,7 +1080,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1120,7 +1121,7 @@ void main() {
...
@@ -1120,7 +1121,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1161,7 +1162,7 @@ void main() {
...
@@ -1161,7 +1162,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1202,7 +1203,7 @@ void main() {
...
@@ -1202,7 +1203,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1243,7 +1244,7 @@ void main() {
...
@@ -1243,7 +1244,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1286,7 +1287,7 @@ void main() {
...
@@ -1286,7 +1287,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1329,7 +1330,7 @@ void main() {
...
@@ -1329,7 +1330,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1361,7 +1362,7 @@ void main() {
...
@@ -1361,7 +1362,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1387,7 +1388,7 @@ void main() {
...
@@ -1387,7 +1388,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1412,7 +1413,7 @@ void main() {
...
@@ -1412,7 +1413,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1487,7 +1488,7 @@ void main() {
...
@@ -1487,7 +1488,7 @@ void main() {
Logger:
()
=>
FakeStatusLogger
(
BufferLogger
.
test
()),
Logger:
()
=>
FakeStatusLogger
(
BufferLogger
.
test
()),
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1534,7 +1535,7 @@ void main() {
...
@@ -1534,7 +1535,7 @@ void main() {
Logger:
()
=>
FakeStatusLogger
(
BufferLogger
.
test
()),
Logger:
()
=>
FakeStatusLogger
(
BufferLogger
.
test
()),
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1551,7 +1552,7 @@ void main() {
...
@@ -1551,7 +1552,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1568,7 +1569,7 @@ void main() {
...
@@ -1568,7 +1569,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1585,7 +1586,7 @@ void main() {
...
@@ -1585,7 +1586,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1600,7 +1601,7 @@ void main() {
...
@@ -1600,7 +1601,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
...
@@ -1627,7 +1628,7 @@ void main() {
...
@@ -1627,7 +1628,7 @@ void main() {
)),
)),
FileSystem:
()
=>
fileSystem
,
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
ProcessManager:
()
=>
processManager
,
Pub:
()
=>
Mock
Pub
(),
Pub:
()
=>
Fake
Pub
(),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
Platform:
()
=>
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{}),
});
});
}
}
...
@@ -1660,4 +1661,3 @@ class MockWipConnection extends Mock implements WipConnection {}
...
@@ -1660,4 +1661,3 @@ class MockWipConnection extends Mock implements WipConnection {}
class
MockWipDebugger
extends
Mock
implements
WipDebugger
{}
class
MockWipDebugger
extends
Mock
implements
WipDebugger
{}
class
MockWebServerDevice
extends
Mock
implements
WebServerDevice
{}
class
MockWebServerDevice
extends
Mock
implements
WebServerDevice
{}
class
MockDevice
extends
Mock
implements
Device
{}
class
MockDevice
extends
Mock
implements
Device
{}
class
MockPub
extends
Mock
implements
Pub
{}
packages/flutter_tools/test/general.shard/runner/flutter_command_test.dart
View file @
9236eefd
...
@@ -25,6 +25,7 @@ import 'package:mockito/mockito.dart';
...
@@ -25,6 +25,7 @@ import 'package:mockito/mockito.dart';
import
'../../src/common.dart'
;
import
'../../src/common.dart'
;
import
'../../src/context.dart'
;
import
'../../src/context.dart'
;
import
'../../src/fakes.dart'
;
import
'utils.dart'
;
import
'utils.dart'
;
void
main
(
)
{
void
main
(
)
{
...
@@ -672,20 +673,6 @@ class FakeSignals implements Signals {
...
@@ -672,20 +673,6 @@ class FakeSignals implements Signals {
Stream
<
Object
>
get
errors
=>
delegate
.
errors
;
Stream
<
Object
>
get
errors
=>
delegate
.
errors
;
}
}
class
FakePub
extends
Fake
implements
Pub
{
@override
Future
<
void
>
get
({
PubContext
context
,
String
directory
,
bool
skipIfAbsent
=
false
,
bool
upgrade
=
false
,
bool
offline
=
false
,
bool
generateSyntheticPackage
=
false
,
String
flutterRootOverride
,
bool
checkUpToDate
=
false
,
})
async
{
}
}
class
FakeClock
extends
Fake
implements
SystemClock
{
class
FakeClock
extends
Fake
implements
SystemClock
{
List
<
int
>
times
=
<
int
>[];
List
<
int
>
times
=
<
int
>[];
...
...
packages/flutter_tools/test/src/fakes.dart
View file @
9236eefd
...
@@ -14,8 +14,10 @@ import 'package:flutter_tools/src/base/logger.dart';
...
@@ -14,8 +14,10 @@ import 'package:flutter_tools/src/base/logger.dart';
import
'package:flutter_tools/src/base/os.dart'
;
import
'package:flutter_tools/src/base/os.dart'
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/convert.dart'
;
import
'package:flutter_tools/src/convert.dart'
;
import
'package:flutter_tools/src/dart/pub.dart'
;
import
'package:flutter_tools/src/device.dart'
;
import
'package:flutter_tools/src/device.dart'
;
import
'package:flutter_tools/src/ios/plist_parser.dart'
;
import
'package:flutter_tools/src/ios/plist_parser.dart'
;
import
'package:test/fake.dart'
;
/// A fake implementation of the [DeviceLogReader].
/// A fake implementation of the [DeviceLogReader].
class
FakeDeviceLogReader
extends
DeviceLogReader
{
class
FakeDeviceLogReader
extends
DeviceLogReader
{
...
@@ -427,3 +429,17 @@ class FakeBotDetector implements BotDetector {
...
@@ -427,3 +429,17 @@ class FakeBotDetector implements BotDetector {
final
bool
_isRunningOnBot
;
final
bool
_isRunningOnBot
;
}
}
class
FakePub
extends
Fake
implements
Pub
{
@override
Future
<
void
>
get
({
PubContext
context
,
String
directory
,
bool
skipIfAbsent
=
false
,
bool
upgrade
=
false
,
bool
offline
=
false
,
bool
generateSyntheticPackage
=
false
,
String
flutterRootOverride
,
bool
checkUpToDate
=
false
,
})
async
{
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment