Skip to content

Commit

Permalink
[Infra] Fix Swift 6 warning in FirebaseAppTests.swift (#13627)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 authored Sep 11, 2024
1 parent b8ef6d7 commit 0d40135
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions FirebaseCore/Tests/SwiftUnit/FirebaseAppTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -340,22 +340,20 @@ class FirebaseAppTests: XCTestCase {
// MARK: - Helpers

private func expectAppConfigurationNotification(appName: String, isDefaultApp: Bool) {
let expectedUserInfo: NSDictionary = [
let expectedUserInfo: [String: Any] = [
"FIRAppNameKey": appName,
"FIRAppIsDefaultAppKey": NSNumber(value: isDefaultApp),
"FIRGoogleAppIDKey": Constants.Options.googleAppID,
]

expectation(forNotification: NSNotification.Name.firAppReadyToConfigureSDK,
object: FirebaseApp.self, handler: { notification -> Bool in
if let userInfo = notification.userInfo {
if expectedUserInfo.isEqual(to: userInfo) {
return true
}
} else {
guard let userInfo = notification.userInfo else {
XCTFail("Failed to unwrap notification user info")
return false
}
return false
return NSDictionary(dictionary: expectedUserInfo) ==
NSDictionary(dictionary: userInfo)
})
}
}

0 comments on commit 0d40135

Please sign in to comment.