FIRCLSMockReportManager.m 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2019 Google
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #if __has_include(<FBLPromises/FBLPromises.h>)
  15. #import <FBLPromises/FBLPromises.h>
  16. #else
  17. #import "FBLPromises.h"
  18. #endif
  19. #import "Crashlytics/UnitTests/Mocks/FIRCLSMockReportManager.h"
  20. #import "Crashlytics/Crashlytics/Components/FIRCLSContext.h"
  21. #import "Crashlytics/Crashlytics/Controllers/FIRCLSExistingReportManager.h"
  22. #import "Crashlytics/UnitTests/Mocks/FIRCLSMockReportUploader.h"
  23. #import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"
  24. @implementation FIRCLSMockReportManager
  25. - (FBLPromise<NSNumber *> *)startCrashReporterWithProfilingReport:(FIRCLSInternalReport *)report {
  26. NSLog(@"Crash Reporting system disabled for testing");
  27. return [FBLPromise resolvedWith:@YES];
  28. }
  29. - (BOOL)installCrashReportingHandlers:(FIRCLSContextInitData *)initData {
  30. return YES;
  31. // This actually installs crash handlers, there is no need to do that during testing.
  32. }
  33. - (void)crashReportingSetupCompleted {
  34. // This stuff does operations on the main thread, which we don't want during tests.
  35. }
  36. @end