@@ -162,31 +162,23 @@ - (void)testSwizzlingAppDelegate {
162
162
}
163
163
164
164
- (void )testSwizzledIncompleteAppDelegateRemoteNotificationMethod {
165
- IncompleteAppDelegate *incompleteAppDelegate = [[IncompleteAppDelegate alloc ] init ];
166
- [self .mockProxy swizzleAppDelegateMethods: incompleteAppDelegate];
167
- #ifdef BUG_1451
168
- SEL selector = @selector (application:didReceiveRemoteNotification: );
169
- XCTAssertTrue ([incompleteAppDelegate respondsToSelector: selector]);
170
- [incompleteAppDelegate application: OCMClassMock ([UIApplication class ])
171
- didReceiveRemoteNotification: @{}];
172
- // Verify our swizzled method was called
173
- OCMVerify (FCM_swizzle_appDidReceiveRemoteNotification);
174
- #endif
165
+ IncompleteAppDelegate *incompleteAppDelegate = [[IncompleteAppDelegate alloc ] init ];
166
+ [self .mockProxy swizzleAppDelegateMethods: incompleteAppDelegate];
167
+
168
+ [incompleteAppDelegate application: OCMClassMock ([UIApplication class ])
169
+ didReceiveRemoteNotification: @{}];
170
+ // Verify our swizzled method was called
171
+ OCMVerify (FCM_swizzle_appDidReceiveRemoteNotification);
175
172
}
176
173
177
- // If the remote notification with fetch handler is NOT implemented, we will force-implement
178
- // the backup -application:didReceiveRemoteNotification: method
179
174
- (void )testIncompleteAppDelegateRemoteNotificationWithFetchHandlerMethod {
180
175
IncompleteAppDelegate *incompleteAppDelegate = [[IncompleteAppDelegate alloc ] init ];
181
176
[self .mockProxy swizzleAppDelegateMethods: incompleteAppDelegate];
182
177
SEL remoteNotificationWithFetchHandler =
183
178
@selector (application:didReceiveRemoteNotification:fetchCompletionHandler: );
184
179
XCTAssertFalse ([incompleteAppDelegate respondsToSelector: remoteNotificationWithFetchHandler]);
185
-
186
- #ifdef BUG_1451
187
180
SEL remoteNotification = @selector (application:didReceiveRemoteNotification: );
188
181
XCTAssertTrue ([incompleteAppDelegate respondsToSelector: remoteNotification]);
189
- #endif
190
182
}
191
183
192
184
- (void )testSwizzledAppDelegateRemoteNotificationMethods {
0 commit comments