Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
einsteinx2 committed Dec 11, 2024
1 parent c3a21dc commit 0c14f08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 5 additions & 4 deletions UnitTests/MPURLRequestBuilderTests.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import <XCTest/XCTest.h>
#import <OCMock/OCMock.h>
#import "mParticle.h"
#import "MPURLRequestBuilder.h"
#import "MPStateMachine.h"
#import "MPIConstants.h"
Expand All @@ -14,18 +15,18 @@
#import "MPMessage.h"
#import "MPBaseTestCase.h"
#import "MPKitConfiguration.h"
#import "MParticleWebView.h"
#import "MPExtensionProtocol.h"
#import "MPURL.h"
#import "MPUpload.h"
#import "mParticle.h"
#import "MParticleSwift.h"


@interface MParticle ()

+ (dispatch_queue_t)messageQueue;
@property (nonatomic, strong) MPStateMachine_PRIVATE *stateMachine;
@property (nonatomic, strong) MPKitContainer_PRIVATE *kitContainer_PRIVATE;
@property (nonatomic, strong) MParticleWebView *webView;
@property (nonatomic, strong) MParticleWebView_PRIVATE *webView;

@end

Expand Down Expand Up @@ -370,7 +371,7 @@ - (void)testInvalidURLs {

- (void)testEventRequest {
MParticle *sharedInstance = [MParticle sharedInstance];
MParticleWebView *webview = sharedInstance.webView;
MParticleWebView_PRIVATE *webview = sharedInstance.webView;
NSString *agent = @"Example resolved agent";

id mockWebView = OCMPartialMock(webview);
Expand Down
7 changes: 3 additions & 4 deletions UnitTests/MParticleTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#import "MPSession.h"
#import "MPBackendController.h"
#import "MPURLRequestBuilder.h"
#import "MParticleWebView.h"
#import "MPPersistenceController.h"
#import "MPIUserDefaults.h"
#import "MPURL.h"
Expand All @@ -26,7 +25,7 @@ + (dispatch_queue_t)messageQueue;
@property (nonatomic, strong) MParticleOptions *options;
- (BOOL)isValidBridgeName:(NSString *)bridgeName;
- (void)handleWebviewCommand:(NSString *)command dictionary:(NSDictionary *)dictionary;
@property (nonatomic, strong) MParticleWebView *webView;
@property (nonatomic, strong) MParticleWebView_PRIVATE *webView;
@end

@interface MParticleUser ()
Expand Down Expand Up @@ -980,7 +979,7 @@ - (void)testSetATTStatusRemoveIDFA {
}

- (void)testUserAgentDefault {
id mockWebView = OCMClassMock([MParticleWebView class]);
id mockWebView = OCMClassMock([MParticleWebView_PRIVATE class]);
#if TARGET_OS_IOS == 1
[[[mockWebView stub] andReturn:@"Example resolved agent"] userAgent];
#else
Expand All @@ -1003,7 +1002,7 @@ - (void)testUserAgentDefault {

- (void)testUserAgentCustom {
NSString *customAgent = @"Foo 1.2.3 Like Bar";
id mockWebView = OCMClassMock([MParticleWebView class]);
id mockWebView = OCMClassMock([MParticleWebView_PRIVATE class]);
[[[mockWebView stub] andReturn:customAgent] userAgent];
id mockMParticle = OCMPartialMock([MParticle sharedInstance]);
[[[mockMParticle stub] andReturn:mockWebView] webView];
Expand Down

0 comments on commit 0c14f08

Please sign in to comment.