|
29 | 29 | #import <FirebaseCore/FIRLogger.h>
|
30 | 30 | #import <FirebaseCore/FIROptions.h>
|
31 | 31 | #import <GoogleUtilities/GULNSData+zlib.h>
|
| 32 | +#import <OCMock/OCMStubRecorder.h> |
32 | 33 | #import <OCMock/OCMock.h>
|
33 | 34 |
|
34 | 35 | @interface RCNConfigFetch (ForTest)
|
@@ -192,14 +193,15 @@ - (void)setUp {
|
192 | 193 | namespace:fullyQualifiedNamespace
|
193 | 194 | options:currentOptions]);
|
194 | 195 |
|
195 |
| - OCMStub([_configFetch[i] fetchConfigWithExpirationDuration:0 completionHandler:OCMOCK_ANY]) |
196 |
| - .ignoringNonObjectArgs() |
197 |
| - .andDo(^(NSInvocation *invocation) { |
198 |
| - void (^handler)(FIRRemoteConfigFetchStatus status, NSError *_Nullable error) = nil; |
199 |
| - [invocation getArgument:&handler atIndex:3]; |
200 |
| - [_configFetch[i] fetchWithUserProperties:[[NSDictionary alloc] init] |
201 |
| - completionHandler:handler]; |
202 |
| - }); |
| 196 | + OCMStubRecorder *mock = OCMStub([_configFetch[i] fetchConfigWithExpirationDuration:0 |
| 197 | + completionHandler:OCMOCK_ANY]); |
| 198 | + mock = [mock ignoringNonObjectArgs]; |
| 199 | + mock.andDo(^(NSInvocation *invocation) { |
| 200 | + void (^handler)(FIRRemoteConfigFetchStatus status, NSError *_Nullable error) = nil; |
| 201 | + [invocation getArgument:&handler atIndex:3]; |
| 202 | + [_configFetch[i] fetchWithUserProperties:[[NSDictionary alloc] init] |
| 203 | + completionHandler:handler]; |
| 204 | + }); |
203 | 205 |
|
204 | 206 | _response[i] = @{@"state" : @"UPDATE", @"entries" : _entries[i]};
|
205 | 207 |
|
|
0 commit comments