Browse Source

Fix cases of multiple stubs on the same method on a mock (#14649)

Paul Beusterien 1 year ago
parent
commit
e60f37986f
1 changed files with 4 additions and 4 deletions
  1. 4 4
      FirebaseCore/Tests/Unit/FIRBundleUtilTest.m

+ 4 - 4
FirebaseCore/Tests/Unit/FIRBundleUtilTest.m

@@ -112,19 +112,19 @@ static NSString *const kFileType = @"fileType";
   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 ]]);