Skip to content

Commit e60f379

Browse files
authored
Fix cases of multiple stubs on the same method on a mock (#14649)
1 parent 1ebe6dc commit e60f379

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

FirebaseCore/Tests/Unit/FIRBundleUtilTest.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,19 @@ - (void)testBundleIdentifierHasPrefixInBundlesNotValidExtension {
112112
id environmentUtilsMock = [OCMockObject mockForClass:[GULAppEnvironmentUtil class]];
113113
[[[environmentUtilsMock stub] andReturnValue:@(YES)] isAppExtension];
114114

115-
OCMStub([self.mockBundle bundleIdentifier]).andReturn(@"com.google.test.someextension.some");
115+
OCMExpect([self.mockBundle bundleIdentifier]).andReturn(@"com.google.test.someextension.some");
116116
XCTAssertFalse([FIRBundleUtil hasBundleIdentifierPrefix:@"com.google.test"
117117
inBundles:@[ self.mockBundle ]]);
118118

119-
OCMStub([self.mockBundle bundleIdentifier]).andReturn(@"com.google.testsomeextension");
119+
OCMExpect([self.mockBundle bundleIdentifier]).andReturn(@"com.google.testsomeextension");
120120
XCTAssertFalse([FIRBundleUtil hasBundleIdentifierPrefix:@"com.google.test"
121121
inBundles:@[ self.mockBundle ]]);
122122

123-
OCMStub([self.mockBundle bundleIdentifier]).andReturn(@"com.google.testsomeextension.some");
123+
OCMExpect([self.mockBundle bundleIdentifier]).andReturn(@"com.google.testsomeextension.some");
124124
XCTAssertFalse([FIRBundleUtil hasBundleIdentifierPrefix:@"com.google.test"
125125
inBundles:@[ self.mockBundle ]]);
126126

127-
OCMStub([self.mockBundle bundleIdentifier]).andReturn(@"not-exist");
127+
OCMExpect([self.mockBundle bundleIdentifier]).andReturn(@"not-exist");
128128
XCTAssertFalse([FIRBundleUtil hasBundleIdentifierPrefix:@"com.google.test"
129129
inBundles:@[ self.mockBundle ]]);
130130

0 commit comments

Comments
 (0)