Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix test
  • Loading branch information
Chris Yang committed Aug 1, 2023
commit 03d6b06a05307d74c258e6fee3199b233ba6a060
Original file line number Diff line number Diff line change
Expand Up @@ -1903,9 +1903,10 @@ - (void)testLifeCycleNotificationWillTerminate {
object:nil
userInfo:nil];
id mockVC = OCMPartialMock(flutterViewController);
id mockEngine = OCMPartialMock(engine);
OCMStub([mockVC engine]).andReturn(mockEngine);
[[NSNotificationCenter defaultCenter] postNotification:sceneNotification];
[[NSNotificationCenter defaultCenter] postNotification:applicationNotification];
id mockEngine = OCMPartialMock(engine);
#if APPLICATION_EXTENSION_API_ONLY
OCMVerify([mockVC sceneWillDisconnect:[OCMArg any]]);
OCMReject([mockVC applicationWillTerminate:[OCMArg any]]);
Expand Down Expand Up @@ -1941,8 +1942,8 @@ - (void)testLifeCycleNotificationDidEnterBackground {
OCMReject([mockVC sceneDidEnterBackground:[OCMArg any]]);
OCMVerify([mockVC applicationDidEnterBackground:[OCMArg any]]);
#endif
XCTAssertFalse(flutterViewController.isKeyboardInOrTransitioningFromBackground);
OCMVerify([mockVC surfaceUpdated:YES]);
XCTAssertTrue(flutterViewController.isKeyboardInOrTransitioningFromBackground);
OCMVerify([mockVC surfaceUpdated:NO]);
OCMVerify([mockVC goToApplicationLifecycle:@"AppLifecycleState.paused"]);
[flutterViewController deregisterNotifications];
}
Expand Down