File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change 3434#import " MSIDWorkPlaceJoinUtilBase+Internal.h"
3535#import " MSIDWPJMetadata.h"
3636#import " MSIDFlightManager.h"
37+ #import " MSIDFlightManagerMockProvider.h"
3738#import " MSIDConstants.h"
3839
3940@interface MSIDWorkPlaceJoinUtilTests : XCTestCase
@@ -69,7 +70,7 @@ - (void)setUp
6970 // Setting use iOS style keychain to true by default. Set it to NO in test cases that require ACL.
7071 self.useIosStyleKeychain = YES ;
7172 self.tenantId = NSUUID .UUID .UUIDString ;
72- [self swizzleFlight ];
73+ [self mockFlightValues ];
7374#if TARGET_OS_OSX
7475 self.useIosStyleKeychain = NO ;
7576#endif
@@ -852,18 +853,10 @@ - (void)insertEccStkKeyForTenantIdentifier:(NSString *)tenantIdentifier
852853 accessGroup: keychainGroup];
853854}
854855
855- - (void )swizzleFlight
856+ - (void )mockFlightValues
856857{
857- [MSIDTestSwizzle instanceMethod: @selector (boolForKey: )
858- class: [MSIDFlightManager class ]
859- block: (id )^(NSString *flightKey)
860- {
861- if ([flightKey isEqualToString: MSID_FLIGHT_ENABLE_QUERYING_STK])
862- {
863- return YES ;
864- }
865- return NO ;
866- }];
867-
858+ MSIDFlightManagerMockProvider *flightProvider = [MSIDFlightManagerMockProvider new ];
859+ flightProvider.boolForKeyContainer = @{ MSID_FLIGHT_ENABLE_QUERYING_STK: @YES };
860+ MSIDFlightManager.sharedInstance .flightProvider = flightProvider;
868861}
869862@end
You can’t perform that action at this time.
0 commit comments