Skip to content

Commit 31758ca

Browse files
committed
update database integration tests
1 parent 655b19b commit 31758ca

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

Example/Core/Tests/FIRComponentContainerTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ - (instancetype)initWithApp:(FIRApp *)app
4343
components:(NSDictionary<NSString *, FIRComponentCreationBlock> *)components {
4444
self = [self initWithApp:app registrants:[[NSMutableSet alloc] init]];
4545
if (self) {
46-
components = [components mutableCopy];
46+
self.components = [components mutableCopy];
4747
}
4848
return self;
4949
}

Example/Database/Tests/Helpers/FIRFakeApp.m

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,27 @@ @interface FIRDatabaseComponent (Internal)
3939
- (instancetype)initWithApp:(FIRApp *)app;
4040
@end
4141

42+
@interface FIRComponentContainer (TestInternal)
43+
@property(nonatomic, strong) NSMutableDictionary<NSString *, FIRComponentCreationBlock> *components;
44+
@end
45+
46+
@interface FIRComponentContainer (TestInternalImplementations)
47+
- (instancetype)initWithApp:(FIRApp *)app
48+
components:(NSDictionary<NSString *, FIRComponentCreationBlock> *)components;
49+
@end
50+
51+
@implementation FIRComponentContainer (TestInternalImplementations)
52+
53+
- (instancetype)initWithApp:(FIRApp *)app
54+
components:(NSDictionary<NSString *, FIRComponentCreationBlock> *)components {
55+
self = [self initWithApp:app registrants:[[NSMutableSet alloc] init]];
56+
if (self) {
57+
self.components = [components mutableCopy];
58+
}
59+
return self;
60+
}
61+
@end
62+
4263
@implementation FIRFakeApp
4364

4465
- (instancetype)initWithName:(NSString *)name URL:(NSString *)url {

0 commit comments

Comments
 (0)