Skip to content

There should be a setMockMethodCallHandler equivalent for EventChannel #26528

@truongsinh

Description

@truongsinh

I see that setMockMethodCallHandler is quite handy for MethodChannel, but found no equivalent for EventChannel. Here's the current way to mock and test EventChannel https://github.com/flutter/plugins/blob/master/packages/battery/test/battery_test.dart#L38

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: pluginsSupport for writing, building, and running plugin packagesa: tests"flutter test", flutter_test, or one of our testsc: new featureNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions