From 0da863795cb28a827bc5408b82c4028053c12a06 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 3 Apr 2025 16:17:03 -0700 Subject: [PATCH] Fix cases of multiple stubs on the same method on a mock --- FirebaseCore/Tests/Unit/FIRBundleUtilTest.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FirebaseCore/Tests/Unit/FIRBundleUtilTest.m b/FirebaseCore/Tests/Unit/FIRBundleUtilTest.m index e71c143bc79..2b28ebb7920 100644 --- a/FirebaseCore/Tests/Unit/FIRBundleUtilTest.m +++ b/FirebaseCore/Tests/Unit/FIRBundleUtilTest.m @@ -112,19 +112,19 @@ - (void)testBundleIdentifierHasPrefixInBundlesNotValidExtension { id environmentUtilsMock = [OCMockObject mockForClass:[GULAppEnvironmentUtil class]]; [[[environmentUtilsMock stub] andReturnValue:@(YES)] isAppExtension]; - OCMStub([self.mockBundle bundleIdentifier]).andReturn(@"com.google.test.someextension.some"); + OCMExpect([self.mockBundle bundleIdentifier]).andReturn(@"com.google.test.someextension.some"); XCTAssertFalse([FIRBundleUtil hasBundleIdentifierPrefix:@"com.google.test" inBundles:@[ self.mockBundle ]]); - OCMStub([self.mockBundle bundleIdentifier]).andReturn(@"com.google.testsomeextension"); + OCMExpect([self.mockBundle bundleIdentifier]).andReturn(@"com.google.testsomeextension"); XCTAssertFalse([FIRBundleUtil hasBundleIdentifierPrefix:@"com.google.test" inBundles:@[ self.mockBundle ]]); - OCMStub([self.mockBundle bundleIdentifier]).andReturn(@"com.google.testsomeextension.some"); + OCMExpect([self.mockBundle bundleIdentifier]).andReturn(@"com.google.testsomeextension.some"); XCTAssertFalse([FIRBundleUtil hasBundleIdentifierPrefix:@"com.google.test" inBundles:@[ self.mockBundle ]]); - OCMStub([self.mockBundle bundleIdentifier]).andReturn(@"not-exist"); + OCMExpect([self.mockBundle bundleIdentifier]).andReturn(@"not-exist"); XCTAssertFalse([FIRBundleUtil hasBundleIdentifierPrefix:@"com.google.test" inBundles:@[ self.mockBundle ]]);