From 6b4a4d453a261d01792d4aa81497190df5e5e500 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Sat, 2 Sep 2023 11:31:58 -0700 Subject: [PATCH] mocking present view controller call format --- .../darwin/ios/framework/Source/FlutterPlatformPluginTest.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformPluginTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformPluginTest.mm index 05764102a8e67..73cc460b351f3 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformPluginTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformPluginTest.mm @@ -139,6 +139,10 @@ - (void)testShareScreenInvoked { FlutterViewController* engineViewController = [[[FlutterViewController alloc] initWithEngine:engine nibName:nil bundle:nil] autorelease]; FlutterViewController* mockEngineViewController = OCMPartialMock(engineViewController); + OCMStub([mockEngineViewController + presentViewController:[OCMArg isKindOfClass:[UIActivityViewController class]] + animated:YES + completion:nil]); FlutterPlatformPlugin* plugin = [[[FlutterPlatformPlugin alloc] initWithEngine:_weakFactory->GetWeakPtr()] autorelease];