Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 25efcf2

Browse files
committed
fixed platform_interface tests
1 parent d2871f6 commit 25efcf2

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

packages/image_picker/image_picker_platform_interface/test/new_method_channel_image_picker_test.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ void main() {
1515
MethodChannelImagePicker picker = MethodChannelImagePicker();
1616

1717
final List<MethodCall> log = <MethodCall>[];
18+
dynamic returnValue = '';
1819

19-
20-
setUpAll(() {
20+
setUp(() {
2121
picker.channel.setMockMethodCallHandler((MethodCall methodCall) async {
2222
log.add(methodCall);
23-
return '';
23+
return returnValue;
2424
});
2525

2626
log.clear();
@@ -199,6 +199,7 @@ void main() {
199199

200200
group('#pickMultiImage', () {
201201
test('calls the method correctly', () async {
202+
returnValue = ['0', '1'];
202203
await picker.pickMultiImage();
203204

204205
expect(
@@ -214,6 +215,7 @@ void main() {
214215
});
215216

216217
test('passes the width and height arguments correctly', () async {
218+
returnValue = ['0', '1'];
217219
await picker.pickMultiImage();
218220
await picker.pickMultiImage(
219221
maxWidth: 10.0,
@@ -282,6 +284,7 @@ void main() {
282284
});
283285

284286
test('does not accept a negative width or height argument', () {
287+
returnValue = ['0', '1'];
285288
expect(
286289
() => picker.pickMultiImage(maxWidth: -1.0),
287290
throwsArgumentError,

0 commit comments

Comments
 (0)