diff --git a/BrowserKit/Tests/CommonTests/LoggerTests/CrashManagerTests.swift b/BrowserKit/Tests/CommonTests/LoggerTests/CrashManagerTests.swift index c8b6e39a3f28..b61cc2b2f678 100644 --- a/BrowserKit/Tests/CommonTests/LoggerTests/CrashManagerTests.swift +++ b/BrowserKit/Tests/CommonTests/LoggerTests/CrashManagerTests.swift @@ -15,9 +15,9 @@ final class CrashManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() sentryWrapper = nil setupAppInformation(buildChannel: .other) + super.tearDown() } // MARK: - Setup diff --git a/BrowserKit/Tests/CommonTests/LoggerTests/LoggerFileManagerTests.swift b/BrowserKit/Tests/CommonTests/LoggerTests/LoggerFileManagerTests.swift index e5cecee0d3bb..037285a7cdb5 100644 --- a/BrowserKit/Tests/CommonTests/LoggerTests/LoggerFileManagerTests.swift +++ b/BrowserKit/Tests/CommonTests/LoggerTests/LoggerFileManagerTests.swift @@ -16,9 +16,9 @@ final class LoggerFileManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() subject = nil fileManager = nil + super.tearDown() } func testExpectedLogDestination() throws { diff --git a/BrowserKit/Tests/CommonTests/LoggerTests/LoggerTests.swift b/BrowserKit/Tests/CommonTests/LoggerTests/LoggerTests.swift index 8e18aa78cc80..d84a7a504ec8 100644 --- a/BrowserKit/Tests/CommonTests/LoggerTests/LoggerTests.swift +++ b/BrowserKit/Tests/CommonTests/LoggerTests/LoggerTests.swift @@ -17,10 +17,10 @@ final class LoggerTests: XCTestCase { } override func tearDown() { - super.tearDown() beaverBuilder = nil crashManager = nil cleanUp() + super.tearDown() } // MARK: - Log diff --git a/BrowserKit/Tests/ContentBlockingGeneratorTests/ContentBlockerGeneratorTests.swift b/BrowserKit/Tests/ContentBlockingGeneratorTests/ContentBlockerGeneratorTests.swift index cae74a70728a..4c916c9fa2c8 100644 --- a/BrowserKit/Tests/ContentBlockingGeneratorTests/ContentBlockerGeneratorTests.swift +++ b/BrowserKit/Tests/ContentBlockingGeneratorTests/ContentBlockerGeneratorTests.swift @@ -16,9 +16,9 @@ final class ContentBlockerGeneratorTests: XCTestCase { } override func tearDown() { - super.tearDown() self.fileManager = nil self.parserData = nil + super.tearDown() } func testGenerator_whenEmptyFiles_generateNothing() { diff --git a/BrowserKit/Tests/ContentBlockingGeneratorTests/ContentBlockerParserTests.swift b/BrowserKit/Tests/ContentBlockingGeneratorTests/ContentBlockerParserTests.swift index 2bd2c3d58900..c323c6bc642f 100644 --- a/BrowserKit/Tests/ContentBlockingGeneratorTests/ContentBlockerParserTests.swift +++ b/BrowserKit/Tests/ContentBlockingGeneratorTests/ContentBlockerParserTests.swift @@ -14,8 +14,8 @@ final class ContentBlockerParserTests: XCTestCase { } override func tearDown() { - super.tearDown() self.parserData = nil + super.tearDown() } func testParsingAdsFile() throws { diff --git a/BrowserKit/Tests/ReduxTests/ReduxIntegrationTests.swift b/BrowserKit/Tests/ReduxTests/ReduxIntegrationTests.swift index 24397aea2a0c..abaaae529b0c 100644 --- a/BrowserKit/Tests/ReduxTests/ReduxIntegrationTests.swift +++ b/BrowserKit/Tests/ReduxTests/ReduxIntegrationTests.swift @@ -20,8 +20,8 @@ final class ReduxIntegrationTests: XCTestCase { } override func tearDown() { - super.tearDown() fakeViewController = nil + super.tearDown() } func testDispatchStore_IncreaseCounter() { diff --git a/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/FaviconURLCacheTests.swift b/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/FaviconURLCacheTests.swift index fec565fe690b..c337eadba939 100644 --- a/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/FaviconURLCacheTests.swift +++ b/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/FaviconURLCacheTests.swift @@ -16,9 +16,9 @@ class FaviconURLCacheTests: XCTestCase { } override func tearDown() { - super.tearDown() mockFileManager = nil subject = nil + super.tearDown() } func testGetURLFromCacheWithEmptyCache() async { diff --git a/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/FaviconURLFetcherTests.swift b/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/FaviconURLFetcherTests.swift index cb5cbb748a73..65d0429db710 100644 --- a/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/FaviconURLFetcherTests.swift +++ b/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/FaviconURLFetcherTests.swift @@ -16,9 +16,9 @@ class FaviconURLFetcherTests: XCTestCase { } override func tearDown() { - super.tearDown() networkMock = nil subject = nil + super.tearDown() } func testGetFaviconWithExistingIcon() async { diff --git a/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/URLCacheFileManagerTests.swift b/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/URLCacheFileManagerTests.swift index 8b9ec6886ab0..09c3e9a89a44 100644 --- a/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/URLCacheFileManagerTests.swift +++ b/BrowserKit/Tests/SiteImageViewTests/FaviconURLProcessing/URLCacheFileManagerTests.swift @@ -17,9 +17,9 @@ class URLCacheFileManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() mockFileManager = nil subject = nil + super.tearDown() } func testGetURLCache() async { diff --git a/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/FaviconFetcherTests.swift b/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/FaviconFetcherTests.swift index cc9071978e91..bd26b46b6ecf 100644 --- a/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/FaviconFetcherTests.swift +++ b/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/FaviconFetcherTests.swift @@ -16,8 +16,8 @@ final class FaviconFetcherTests: XCTestCase { } override func tearDown() { - super.tearDown() self.mockImageDownloader = nil + super.tearDown() } func testReturnsFailure_onAnyError() async { diff --git a/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/HeroImageFetcherTests.swift b/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/HeroImageFetcherTests.swift index a945be7dad9e..fc3f307dfbaa 100644 --- a/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/HeroImageFetcherTests.swift +++ b/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/HeroImageFetcherTests.swift @@ -15,8 +15,8 @@ final class HeroImageFetcherTests: XCTestCase { } override func tearDown() { - super.tearDown() self.metadataProvider = nil + super.tearDown() } func testHeroImageLoading_whenError_throwsError() async { diff --git a/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/ImageHandlerTests.swift b/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/ImageHandlerTests.swift index 117730ce5abb..a10422e574d3 100644 --- a/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/ImageHandlerTests.swift +++ b/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/ImageHandlerTests.swift @@ -24,11 +24,11 @@ final class ImageHandlerTests: XCTestCase { } override func tearDown() { - super.tearDown() self.heroImageFetcher = nil self.siteImageCache = nil self.faviconFetcher = nil self.letterImageGenerator = nil + super.tearDown() } // MARK: - Favicon diff --git a/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/SiteImageCacheTests.swift b/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/SiteImageCacheTests.swift index 685b686ed820..d3e823823cb2 100644 --- a/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/SiteImageCacheTests.swift +++ b/BrowserKit/Tests/SiteImageViewTests/ImageProcessing/SiteImageCacheTests.swift @@ -15,8 +15,8 @@ final class SiteImageCacheTests: XCTestCase { } override func tearDown() { - super.tearDown() self.imageCache = nil + super.tearDown() } // MARK: - Get from cache diff --git a/BrowserKit/Tests/SiteImageViewTests/SiteImageHandlerTests.swift b/BrowserKit/Tests/SiteImageViewTests/SiteImageHandlerTests.swift index 5ff3c630ff15..f005355a6e27 100644 --- a/BrowserKit/Tests/SiteImageViewTests/SiteImageHandlerTests.swift +++ b/BrowserKit/Tests/SiteImageViewTests/SiteImageHandlerTests.swift @@ -16,9 +16,9 @@ final class SiteImageHandlerTests: XCTestCase { } override func tearDown() { - super.tearDown() self.urlHandler = nil self.imageHandler = nil + super.tearDown() } // MARK: - Favicon diff --git a/BrowserKit/Tests/SiteImageViewTests/SiteImageViewTests.swift b/BrowserKit/Tests/SiteImageViewTests/SiteImageViewTests.swift index 4163d8c385a4..a114158e0090 100644 --- a/BrowserKit/Tests/SiteImageViewTests/SiteImageViewTests.swift +++ b/BrowserKit/Tests/SiteImageViewTests/SiteImageViewTests.swift @@ -14,8 +14,8 @@ final class SiteImageViewTests: XCTestCase { } override func tearDown() { - super.tearDown() self.imageFetcher = nil + super.tearDown() } func testFaviconSetup() { diff --git a/BrowserKit/Tests/TabDataStoreTests/TabDataStoreTests.swift b/BrowserKit/Tests/TabDataStoreTests/TabDataStoreTests.swift index b122ca950883..ee19ed373f81 100644 --- a/BrowserKit/Tests/TabDataStoreTests/TabDataStoreTests.swift +++ b/BrowserKit/Tests/TabDataStoreTests/TabDataStoreTests.swift @@ -17,8 +17,8 @@ final class TabDataStoreTests: XCTestCase { } override func tearDown() { - super.tearDown() mockFileManager = nil + super.tearDown() } // MARK: - Saving Data diff --git a/BrowserKit/Tests/TabDataStoreTests/TabSessionStoreTests.swift b/BrowserKit/Tests/TabDataStoreTests/TabSessionStoreTests.swift index c7f23ec9cbc8..638873f70774 100644 --- a/BrowserKit/Tests/TabDataStoreTests/TabSessionStoreTests.swift +++ b/BrowserKit/Tests/TabDataStoreTests/TabSessionStoreTests.swift @@ -15,8 +15,8 @@ final class TabSessionStoreTests: XCTestCase { } override func tearDown() { - super.tearDown() mockFileManager = nil + super.tearDown() } // MARK: Save diff --git a/BrowserKit/Tests/WebEngineTests/AdsTelemetryContentScriptTests.swift b/BrowserKit/Tests/WebEngineTests/AdsTelemetryContentScriptTests.swift index 68079a7833fd..5948cbdd41a1 100644 --- a/BrowserKit/Tests/WebEngineTests/AdsTelemetryContentScriptTests.swift +++ b/BrowserKit/Tests/WebEngineTests/AdsTelemetryContentScriptTests.swift @@ -14,8 +14,8 @@ final class AdsTelemetryContentScriptTests: XCTestCase { } override func tearDown() { - super.tearDown() adsTelemetryDelegate = nil + super.tearDown() } func testDidReceiveMessageGivenEmptyMessageThenNoDelegateCalled() { diff --git a/BrowserKit/Tests/WebEngineTests/FindInPageContentScriptTests.swift b/BrowserKit/Tests/WebEngineTests/FindInPageContentScriptTests.swift index 2b6675d94761..e5f8dcb4a074 100644 --- a/BrowserKit/Tests/WebEngineTests/FindInPageContentScriptTests.swift +++ b/BrowserKit/Tests/WebEngineTests/FindInPageContentScriptTests.swift @@ -14,8 +14,8 @@ final class FindInPageContentScriptTests: XCTestCase { } override func tearDown() { - super.tearDown() findInPageDelegate = nil + super.tearDown() } func testDidReceiveMessageGivenEmptyMessageThenNoDelegateCalled() { diff --git a/BrowserKit/Tests/WebEngineTests/MetadataFetcherHelperTests.swift b/BrowserKit/Tests/WebEngineTests/MetadataFetcherHelperTests.swift index 6cd671adf450..69745a46ce48 100644 --- a/BrowserKit/Tests/WebEngineTests/MetadataFetcherHelperTests.swift +++ b/BrowserKit/Tests/WebEngineTests/MetadataFetcherHelperTests.swift @@ -14,8 +14,8 @@ final class MetadataFetcherHelperTests: XCTestCase { } override func tearDown() { - super.tearDown() metadataDelegate = nil + super.tearDown() } func testFetchFromSessionGivenNotWebpageURLThenPageMetadataNil() { diff --git a/BrowserKit/Tests/WebEngineTests/WKContentScriptManagerTests.swift b/BrowserKit/Tests/WebEngineTests/WKContentScriptManagerTests.swift index 4176227bc541..993ca8dae47b 100644 --- a/BrowserKit/Tests/WebEngineTests/WKContentScriptManagerTests.swift +++ b/BrowserKit/Tests/WebEngineTests/WKContentScriptManagerTests.swift @@ -14,8 +14,8 @@ final class WKContentScriptManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() script = nil + super.tearDown() } func testAddContentGivenAddedTwiceThenOnlyAddOnce() { diff --git a/BrowserKit/Tests/WebEngineTests/WKEngineSessionTests.swift b/BrowserKit/Tests/WebEngineTests/WKEngineSessionTests.swift index 037addb26c4c..dff0f057c4e4 100644 --- a/BrowserKit/Tests/WebEngineTests/WKEngineSessionTests.swift +++ b/BrowserKit/Tests/WebEngineTests/WKEngineSessionTests.swift @@ -27,7 +27,6 @@ final class WKEngineSessionTests: XCTestCase { } override func tearDown() { - super.tearDown() configurationProvider = nil webViewProvider = nil contentScriptManager = nil @@ -35,6 +34,7 @@ final class WKEngineSessionTests: XCTestCase { engineSessionDelegate = nil findInPageDelegate = nil metadataFetcher = nil + super.tearDown() } // MARK: Load URL diff --git a/BrowserKit/Tests/WebEngineTests/WKEngineTests.swift b/BrowserKit/Tests/WebEngineTests/WKEngineTests.swift index 51fa0fa7102d..c4d69f07a415 100644 --- a/BrowserKit/Tests/WebEngineTests/WKEngineTests.swift +++ b/BrowserKit/Tests/WebEngineTests/WKEngineTests.swift @@ -14,8 +14,8 @@ final class WKEngineTests: XCTestCase { } override func tearDown() { - super.tearDown() userScriptManager = nil + super.tearDown() } func testCreateViewThenCreatesView() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Application/AppSendTabDelegateTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Application/AppSendTabDelegateTests.swift index 653ac2a74801..76beaacf26b0 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Application/AppSendTabDelegateTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Application/AppSendTabDelegateTests.swift @@ -16,9 +16,9 @@ final class AppFxACommandsTests: XCTestCase { } override func tearDown() { - super.tearDown() self.applicationStateProvider = nil self.applicationHelper = nil + super.tearDown() } func testOpenSendTabs_inactiveState_doesntCallDeeplink() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Autofill/FormAutofillHelperTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Autofill/FormAutofillHelperTests.swift index 0f65ebe38163..2ee3554e59d8 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Autofill/FormAutofillHelperTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Autofill/FormAutofillHelperTests.swift @@ -78,7 +78,6 @@ class FormAutofillHelperTests: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil DependencyHelperMock().reset() tab = nil @@ -87,6 +86,7 @@ class FormAutofillHelperTests: XCTestCase { validPayloadCaptureMockWKMessage = nil secureFrameMock = nil secureWebviewMock = nil + super.tearDown() } // MARK: Parsing diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/BreachAlertsTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/BreachAlertsTests.swift index a83965ca5bd3..84f3d3dcbbca 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/BreachAlertsTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/BreachAlertsTests.swift @@ -68,8 +68,8 @@ class BreachAlertsTests: XCTestCase { } override func tearDown() { - super.tearDown() breachAlertsManager = nil + super.tearDown() } func testDataRequest() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/BrowserViewControllerStateTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/BrowserViewControllerStateTests.swift index 23af949fc550..a3db911c7ebd 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/BrowserViewControllerStateTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/BrowserViewControllerStateTests.swift @@ -14,8 +14,8 @@ final class BrowserViewControllerStateTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testAddNewTabAction() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CanRemoveQuickActionBookmarkTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CanRemoveQuickActionBookmarkTests.swift index 4c7d003a3e24..2ffb36fc72c9 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CanRemoveQuickActionBookmarkTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CanRemoveQuickActionBookmarkTests.swift @@ -21,10 +21,10 @@ class CanRemoveQuickActionBookmarkTests: XCTestCase { } override func tearDown() { - super.tearDown() mockQuickActions = nil mockBookmarksHandler = nil subject = nil + super.tearDown() } func testWithoutBookmarks() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/ContextMenuHelperTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/ContextMenuHelperTests.swift index 0d266cd7ab14..6a54e037fab8 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/ContextMenuHelperTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/ContextMenuHelperTests.swift @@ -23,9 +23,9 @@ class ContextMenuHelperTests: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil AppContainer.shared.reset() + super.tearDown() } func testHistoryHighlightsTelemetry() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/BaseCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/BaseCoordinatorTests.swift index 7cd0e7483008..052940187a10 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/BaseCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/BaseCoordinatorTests.swift @@ -16,9 +16,9 @@ final class BaseCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() navigationController = nil router = nil + super.tearDown() } func testAddChild() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/DefaultRouterTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/DefaultRouterTests.swift index b1cb5972a1f3..a4582dbdea70 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/DefaultRouterTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/DefaultRouterTests.swift @@ -14,8 +14,8 @@ final class DefaultRouterTests: XCTestCase { } override func tearDown() { - super.tearDown() navigationController = nil + super.tearDown() } func testInitialState() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/EnhancedTrackingProtectionCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/EnhancedTrackingProtectionCoordinatorTests.swift index e016b0d28896..2d56935a509f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/EnhancedTrackingProtectionCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/EnhancedTrackingProtectionCoordinatorTests.swift @@ -28,7 +28,6 @@ final class EnhancedTrackingProtectionCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() self.routeBuilder = nil self.mockRouter = nil self.profile = nil @@ -36,6 +35,7 @@ final class EnhancedTrackingProtectionCoordinatorTests: XCTestCase { self.glean = nil self.delegate = nil AppContainer.shared.reset() + super.tearDown() } func testParentCoordinatorDelegate_calledWithPage() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/FakespotCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/FakespotCoordinatorTests.swift index 7eecd21642f1..80a65e7b5a3f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/FakespotCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/FakespotCoordinatorTests.swift @@ -22,10 +22,10 @@ final class FakespotCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() self.profile = nil self.mockRouter = nil AppContainer.shared.reset() + super.tearDown() } func testInitialState() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Launch/LaunchCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Launch/LaunchCoordinatorTests.swift index 585c2240c870..160e493017eb 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Launch/LaunchCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Launch/LaunchCoordinatorTests.swift @@ -22,11 +22,11 @@ final class LaunchCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil mockRouter = nil delegate = nil AppContainer.shared.reset() + super.tearDown() } func testInitialState() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Launch/LaunchTypeTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Launch/LaunchTypeTests.swift index 46d472cced13..7c761c72fb03 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Launch/LaunchTypeTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Launch/LaunchTypeTests.swift @@ -15,8 +15,8 @@ final class LaunchTypeTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() + super.tearDown() } func testCanLaunch_surveyFromBrowserCoordinator() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/LaunchView/LaunchScreenViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/LaunchView/LaunchScreenViewControllerTests.swift index 251482ba7e9f..d221cbe77b2e 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/LaunchView/LaunchScreenViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/LaunchView/LaunchScreenViewControllerTests.swift @@ -19,10 +19,10 @@ final class LaunchScreenViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() viewModel = nil coordinatorDelegate = nil + super.tearDown() } func testNotLoaded_notCalled() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/LaunchView/LaunchScreenViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/LaunchView/LaunchScreenViewModelTests.swift index 31463a4398ce..89a3f07f1488 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/LaunchView/LaunchScreenViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/LaunchView/LaunchScreenViewModelTests.swift @@ -25,13 +25,13 @@ final class LaunchScreenViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() profile = nil messageManager = nil delegate = nil UserDefaults.standard.set(false, forKey: PrefsKeys.NimbusFeatureTestsOverride) + super.tearDown() } func testLaunchDoesntCallLoadedIfNotStarted() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/BookmarksCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/BookmarksCoordinatorTests.swift index 456f05b27da5..432720b5fe8f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/BookmarksCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/BookmarksCoordinatorTests.swift @@ -22,12 +22,12 @@ final class BookmarksCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() router = nil profile = nil parentCoordinator = nil navigationHandler = nil + super.tearDown() } func testStart() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/DownloadsCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/DownloadsCoordinatorTests.swift index daf758ec1929..35901fad1699 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/DownloadsCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/DownloadsCoordinatorTests.swift @@ -20,11 +20,11 @@ final class DownloadsCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() router = nil parentCoordinator = nil profile = nil DependencyHelperMock().reset() + super.tearDown() } func testHandleFile_presentsShareController() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/HistoryCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/HistoryCoordinatorTests.swift index a66744a7fb35..999d2972c453 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/HistoryCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/HistoryCoordinatorTests.swift @@ -24,13 +24,13 @@ final class HistoryCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() router = nil profile = nil parentCoordinator = nil notificationCenter = nil navigationHandler = nil + super.tearDown() } func testShowRecentlyClosedTabs() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/LibraryCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/LibraryCoordinatorTests.swift index 6fd77c887bf8..23644fdd6540 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/LibraryCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/LibraryCoordinatorTests.swift @@ -20,10 +20,10 @@ final class LibraryCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() self.mockRouter = nil self.delegate = nil DependencyHelperMock().reset() + super.tearDown() } func testEmptyChildren_whenCreated() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/ReadingListCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/ReadingListCoordinatorTests.swift index f97706692398..981ef8c9eed1 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/ReadingListCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/Library/ReadingListCoordinatorTests.swift @@ -21,10 +21,10 @@ final class ReadingListCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() router = nil parentCoordinator = nil navigationHandler = nil + super.tearDown() } func testOpenUrl() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/PasswordManagerCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/PasswordManagerCoordinatorTests.swift index c4ee30766d5f..b69cf12ebb36 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/PasswordManagerCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/PasswordManagerCoordinatorTests.swift @@ -20,10 +20,10 @@ final class PasswordManagerCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() self.mockRouter = nil self.mockParentCoordinator = nil DependencyHelperMock().reset() + super.tearDown() } func testStart_withShowOnboarding() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/QRCodeCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/QRCodeCoordinatorTests.swift index 182fb06d1893..114234501ac8 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/QRCodeCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/QRCodeCoordinatorTests.swift @@ -16,9 +16,9 @@ final class QRCodeCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() router = nil parentCoordinator = nil + super.tearDown() } func testShowQRCode_presentsQRCodeNavigationController() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/SceneCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/SceneCoordinatorTests.swift index f44d224c031a..5502bf41afe7 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/SceneCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/SceneCoordinatorTests.swift @@ -18,9 +18,9 @@ final class SceneCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() mockRouter = nil AppContainer.shared.reset() + super.tearDown() } func testInitialState() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/SettingsCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/SettingsCoordinatorTests.swift index 453aa7480007..1dd7ed95d9aa 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/SettingsCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/SettingsCoordinatorTests.swift @@ -23,12 +23,12 @@ final class SettingsCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() self.mockRouter = nil self.wallpaperManager = nil self.delegate = nil self.mockSettingsVC = nil DependencyHelperMock().reset() + super.tearDown() } func testEmptyChildren_whenCreated() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/ShareExtensionCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/ShareExtensionCoordinatorTests.swift index f3597cfec674..9f83fbf9668e 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/ShareExtensionCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/ShareExtensionCoordinatorTests.swift @@ -17,10 +17,10 @@ final class ShareExtensionCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() parentCoordinator = nil mockRouter = nil DependencyHelperMock().reset() + super.tearDown() } func testStart_presentUIActivityViewController() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/RemoteTabsCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/RemoteTabsCoordinatorTests.swift index efbfb548a34b..9f969a642cfe 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/RemoteTabsCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/RemoteTabsCoordinatorTests.swift @@ -23,12 +23,12 @@ final class RemoteTabsCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() mockProfile = nil mockRouter = nil mockApplicationHelper = nil qrDelegate = nil DependencyHelperMock().reset() + super.tearDown() } func testInitialState() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/TabTrayCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/TabTrayCoordinatorTests.swift index fd2b3466ab97..bcdbed40a1df 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/TabTrayCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/TabTrayCoordinatorTests.swift @@ -23,11 +23,11 @@ final class TabTrayCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() mockRouter = nil profile = nil parentCoordinator = nil DependencyHelperMock().reset() + super.tearDown() } func testInitialState() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/TabsCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/TabsCoordinatorTests.swift index ca68c6ea6673..00fcee882ae5 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/TabsCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/TabTray/TabsCoordinatorTests.swift @@ -15,9 +15,9 @@ final class TabsCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() mockRouter = nil DependencyHelperMock().reset() + super.tearDown() } func testInitialState() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardInputFieldTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardInputFieldTests.swift index 32f13b75a1d8..0b90a8e0d358 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardInputFieldTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardInputFieldTests.swift @@ -22,10 +22,9 @@ class CreditCardInputFieldTests: XCTestCase { } override func tearDown() { - super.tearDown() - profile = nil viewModel = nil + super.tearDown() } func testInputFieldPropertiesOnName() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardInputViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardInputViewModelTests.swift index e98f6942eff8..04e0a930cfd3 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardInputViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardInputViewModelTests.swift @@ -49,9 +49,9 @@ class CreditCardInputViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() viewModel = nil profile = nil + super.tearDown() } func testEditViewModel_SavingCard() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardSettingsViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardSettingsViewControllerTests.swift index c5971d365eb4..89224b83c1db 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardSettingsViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardSettingsViewControllerTests.swift @@ -19,10 +19,10 @@ final class CreditCardSettingsViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() profile = nil viewModel = nil + super.tearDown() } func testInputViewFormValuesClearedOnDismiss() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardValidatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardValidatorTests.swift index a8417f0dc89d..5ea6eb961261 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardValidatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CreditCard/CreditCardValidatorTests.swift @@ -16,9 +16,8 @@ class CreditCardValidatorTests: XCTestCase { } override func tearDown() { - super.tearDown() - creditCardValidator = nil + super.tearDown() } func testCardTypeForVisa() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CustomSearchEnginesTest.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CustomSearchEnginesTest.swift index beac8fa92e08..0e1940fba23a 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/CustomSearchEnginesTest.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/CustomSearchEnginesTest.swift @@ -18,8 +18,8 @@ class CustomSearchEnginesTest: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() + super.tearDown() } func testgetSearchTemplate() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/DefaultThemeManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/DefaultThemeManagerTests.swift index 3dd03d494dcb..885cfb4cc268 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/DefaultThemeManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/DefaultThemeManagerTests.swift @@ -19,8 +19,8 @@ final class DefaultThemeManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() userDefaults = nil + super.tearDown() } // MARK: - Initialization tests diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/DownloadQueueTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/DownloadQueueTests.swift index 152b1d97c421..8418cb8974d4 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/DownloadQueueTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/DownloadQueueTests.swift @@ -23,9 +23,9 @@ class DownloadQueueTests: XCTestCase { } override func tearDown() { - super.tearDown() queue = nil download = nil + super.tearDown() } func testDownloadQueueIsEmpty() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/DownloadTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/DownloadTests.swift index b0fed86d9e6e..3ac0b1e1d545 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/DownloadTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/DownloadTests.swift @@ -14,8 +14,8 @@ class DownloadTests: XCTestCase { } override func tearDown() { - super.tearDown() download = nil + super.tearDown() } func testDelegateMemoryLeak() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Extensions/UIPasteboardExtensionsTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Extensions/UIPasteboardExtensionsTests.swift index 7e55aa7b843b..24475e5e6d9a 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Extensions/UIPasteboardExtensionsTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Extensions/UIPasteboardExtensionsTests.swift @@ -16,9 +16,9 @@ class UIPasteboardExtensionsTests: XCTestCase { } override func tearDown() { - super.tearDown() UIPasteboard.remove(withName: pasteboard.name) pasteboard = nil + super.tearDown() } func testAddPNGImage() throws { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/FakespotOptInViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/FakespotOptInViewModelTests.swift index 0543b72a9370..79b2cd327b73 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/FakespotOptInViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/FakespotOptInViewModelTests.swift @@ -20,9 +20,9 @@ final class FakespotOptInCardViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() viewModel = nil mockProfile = nil + super.tearDown() } func testGetWebsites() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/FakespotSettingsCardViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/FakespotSettingsCardViewModelTests.swift index 42b343bafd0d..fbaa23830f7e 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/FakespotSettingsCardViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/FakespotSettingsCardViewModelTests.swift @@ -18,9 +18,9 @@ final class FakespotSettingsCardViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() viewModel = nil mockProfile = nil + super.tearDown() } func testInitialViewModelValues() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/ProductAdsCacheTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/ProductAdsCacheTests.swift index fe8f70415481..098c15a8cd28 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/ProductAdsCacheTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Fakespot/ProductAdsCacheTests.swift @@ -42,10 +42,10 @@ final class ProductAdsCacheTests: XCTestCase { } override func tearDown() { - super.tearDown() cache = nil ads1 = nil ads2 = nil + super.tearDown() } func testCacheAds() async { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/FeatureFlagManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/FeatureFlagManagerTests.swift index 2bd39a67073a..b4adf688ede3 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/FeatureFlagManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/FeatureFlagManagerTests.swift @@ -20,6 +20,7 @@ class FeatureFlagManagerTests: XCTestCase, FeatureFlaggable { override func tearDown() { UserDefaults.standard.removeObject(forKey: PrefsKeys.NimbusFeatureTestsOverride) + super.tearDown() } // MARK: - Tests diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/FileAccessorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/FileAccessorTests.swift index adce71397556..50910f9333cf 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/FileAccessorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/FileAccessorTests.swift @@ -24,9 +24,9 @@ class FileAccessorTests: XCTestCase { } override func tearDown() { - super.tearDown() files = nil testDir = nil + super.tearDown() } func testFileAccessor() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/FirefoxAccountSignInViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/FirefoxAccountSignInViewControllerTests.swift index 45e221e75d36..fe260c84d7ad 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/FirefoxAccountSignInViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/FirefoxAccountSignInViewControllerTests.swift @@ -20,8 +20,8 @@ final class FirefoxAccountSignInViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testFirefoxAccountSignInViewController_simpleCreation_hasNoLeaks() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/BrowserViewControllerWebViewDelegateTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/BrowserViewControllerWebViewDelegateTests.swift index 37733a842ca1..5f0d7cc2599d 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/BrowserViewControllerWebViewDelegateTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/BrowserViewControllerWebViewDelegateTests.swift @@ -26,12 +26,12 @@ class BrowserViewControllerWebViewDelegateTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() profile = nil tabManager = nil subject = nil tabManagerDelegate = nil + super.tearDown() } func testWebViewDidReceiveChallenge_MethodServerTrust() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/SearchEngines/SearchEnginesTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/SearchEngines/SearchEnginesTests.swift index 078574766d34..f71bb18d9c16 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/SearchEngines/SearchEnginesTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/SearchEngines/SearchEnginesTests.swift @@ -28,11 +28,10 @@ class SearchEnginesTests: XCTestCase { } override func tearDown() { - super.tearDown() - profile = nil mockSearchEngineProvider = nil engines = nil + super.tearDown() } func testIncludesExpectedEngines() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/TabScrollControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/TabScrollControllerTests.swift index ba3c292735e2..df95b57296ea 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/TabScrollControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/TabScrollControllerTests.swift @@ -29,12 +29,11 @@ final class TabScrollControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() - mockProfile?.shutdown() self.mockProfile = nil self.subject = nil self.tab = nil + super.tearDown() } func testHandlePan_ScrollingUp() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/TopSitesHelperTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/TopSitesHelperTests.swift index de6a22dfd79d..5e97a44531a1 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/TopSitesHelperTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Browser/TopSitesHelperTests.swift @@ -21,9 +21,9 @@ class TopSitesHelperTests: XCTestCase { } override func tearDown() { - super.tearDown() self.deleteDatabases() self.profile = nil + super.tearDown() } override func setUp() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContentContainerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContentContainerTests.swift index 7ee1198fe5f7..2ca2daa3d674 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContentContainerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContentContainerTests.swift @@ -20,10 +20,10 @@ final class ContentContainerTests: XCTestCase { } override func tearDown() { - super.tearDown() self.profile = nil self.overlayModeManager = nil AppContainer.shared.reset() + super.tearDown() } // MARK: - canAddHomepage diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContextualHints/ContextualHintEligibilityUtilityTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContextualHints/ContextualHintEligibilityUtilityTests.swift index 59bcf2277dbb..fa6c5cc65907 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContextualHints/ContextualHintEligibilityUtilityTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContextualHints/ContextualHintEligibilityUtilityTests.swift @@ -29,13 +29,12 @@ class ContextualHintEligibilityUtilityTests: XCTestCase { } override func tearDown() { - super.tearDown() - profile.shutdown() profile = nil urlBar = nil overlayState = nil subject = nil + super.tearDown() } // MARK: - Test should Present cases diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContextualHints/ContextualHintViewProviderTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContextualHints/ContextualHintViewProviderTests.swift index 63af3bfb2955..0551c306a1e8 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContextualHints/ContextualHintViewProviderTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/ContextualHints/ContextualHintViewProviderTests.swift @@ -19,8 +19,8 @@ class ContextualHintViewProviderTests: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil + super.tearDown() } // MARK: Mark Contextual Hint Configuration diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Bookmarks/BookmarksDataAdaptorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Bookmarks/BookmarksDataAdaptorTests.swift index 97a7e4ddd788..ed4e156f6741 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Bookmarks/BookmarksDataAdaptorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Bookmarks/BookmarksDataAdaptorTests.swift @@ -22,11 +22,11 @@ class BookmarksDataAdaptorTests: XCTestCase { } override func tearDown() { - super.tearDown() mockBookmarksHandler = nil mockNotificationCenter = nil subject = nil mockDelegate = nil + super.tearDown() } // MARK: - getSavedData diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/FirefoxHomeViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/FirefoxHomeViewModelTests.swift index b642b9c53b80..a7e6ff3b9fd6 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/FirefoxHomeViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/FirefoxHomeViewModelTests.swift @@ -24,9 +24,9 @@ class FirefoxHomeViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil AppContainer.shared.reset() + super.tearDown() } // MARK: Number of sections diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/HistoryHighlights/HistoryHighlightsDataAdaptorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/HistoryHighlights/HistoryHighlightsDataAdaptorTests.swift index 823e6bc563a3..e4d58f554e14 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/HistoryHighlights/HistoryHighlightsDataAdaptorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/HistoryHighlights/HistoryHighlightsDataAdaptorTests.swift @@ -34,12 +34,12 @@ class HistoryHighlightsDataAdaptorTests: XCTestCase { } override func tearDown() { - super.tearDown() subject = nil historyManager = nil notificationCenter = nil delegate = nil deletionUtility = nil + super.tearDown() } // Loads history on first launch with data diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/HistoryHighlights/HistoryHighlightsViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/HistoryHighlights/HistoryHighlightsViewModelTests.swift index cb9984060983..4fb6c888349f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/HistoryHighlights/HistoryHighlightsViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/HistoryHighlights/HistoryHighlightsViewModelTests.swift @@ -26,13 +26,12 @@ class HistoryHighlightsViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() - profile = nil dataAdaptor = nil subject = nil delegate = nil telemetry = nil + super.tearDown() } func testLoadNewDataIsEnabled() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/JumpBackIn/JumpBackInDataAdaptorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/JumpBackIn/JumpBackInDataAdaptorTests.swift index 717d022fdef1..db5744571ea8 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/JumpBackIn/JumpBackInDataAdaptorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/JumpBackIn/JumpBackInDataAdaptorTests.swift @@ -23,9 +23,9 @@ final class JumpBackInDataAdaptorTests: XCTestCase { } override func tearDown() { - super.tearDown() mockProfile = nil mockTabManager = nil + super.tearDown() } func testEmptyData() async { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/JumpBackIn/JumpBackInViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/JumpBackIn/JumpBackInViewModelTests.swift index 83ef6fbb150e..a67cdf1ed214 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/JumpBackIn/JumpBackInViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/JumpBackIn/JumpBackInViewModelTests.swift @@ -37,12 +37,12 @@ class JumpBackInViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() adaptor = nil stubBrowserViewController = nil mockTabManager = nil mockProfile = nil AppContainer.shared.reset() + super.tearDown() } // MARK: - Switch to tab diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/LegacyHomepageViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/LegacyHomepageViewControllerTests.swift index a87e5aec4a32..4dabba31552d 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/LegacyHomepageViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/LegacyHomepageViewControllerTests.swift @@ -18,10 +18,10 @@ class LegacyHomepageViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() profile = nil Experiments.events.clearEvents() + super.tearDown() } func testHomepageViewController_simpleCreation_hasNoLeaks() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/LogoHeader/HomeLogoHeaderViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/LogoHeader/HomeLogoHeaderViewModelTests.swift index 5202e27eeea2..312632ea7d10 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/LogoHeader/HomeLogoHeaderViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/LogoHeader/HomeLogoHeaderViewModelTests.swift @@ -19,8 +19,8 @@ class HomeLogoHeaderViewModelTests: XCTestCase, FeatureFlaggable { } override func tearDown() { - super.tearDown() profile = nil + super.tearDown() } func testDefaultHomepageViewModelProtocolValues() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/MessageCard/HomepageMessageCardViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/MessageCard/HomepageMessageCardViewModelTests.swift index 9df3d86999d7..98e5ab8bb1e4 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/MessageCard/HomepageMessageCardViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/MessageCard/HomepageMessageCardViewModelTests.swift @@ -19,9 +19,9 @@ class HomepageMessageCardViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() adaptor = nil messageManager = nil + super.tearDown() } func testNilMessage() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/MessageCard/MessageCardDataAdaptorImplementationTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/MessageCard/MessageCardDataAdaptorImplementationTests.swift index 6982f0598042..1d334e5c21cd 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/MessageCard/MessageCardDataAdaptorImplementationTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/MessageCard/MessageCardDataAdaptorImplementationTests.swift @@ -16,9 +16,9 @@ class MessageCardDataAdaptorImplementationTests: XCTestCase { } override func tearDown() { - super.tearDown() messageManager = nil didLoadNewDataCalled = 0 + super.tearDown() } func testEmptyData() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketDataAdaptorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketDataAdaptorTests.swift index 6f5e91802c54..948be3532ac3 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketDataAdaptorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketDataAdaptorTests.swift @@ -17,9 +17,9 @@ class PocketDataAdaptorTests: XCTestCase { } override func tearDown() { - super.tearDown() mockNotificationCenter = nil mockPocketAPI = nil + super.tearDown() } func testEmptyData() async throws { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketFeedTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketFeedTests.swift index be3951bbef8e..cdd4c3e4b107 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketFeedTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketFeedTests.swift @@ -39,9 +39,9 @@ class PocketStoriesTests: XCTestCase { } override func tearDown() { - super.tearDown() pocketAPI = nil webServer = nil + super.tearDown() } func testPocketStoriesCaching() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketStoryProviderTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketStoryProviderTests.swift index 3a999a4b8d42..f732488eeed3 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketStoryProviderTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketStoryProviderTests.swift @@ -10,8 +10,8 @@ class PocketStoryProviderTests: XCTestCase, FeatureFlaggable { var subject: StoryProvider! override func tearDown() { - super.tearDown() subject = nil + super.tearDown() } func tesFetchingStories_ReturnsList() async { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketViewModelTests.swift index 5f8da921fc93..f341cb8bd240 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/Pocket/PocketViewModelTests.swift @@ -23,9 +23,9 @@ final class PocketViewModelTests: XCTestCase, FeatureFlaggable { } override func tearDown() { - super.tearDown() adaptor = nil profile = nil + super.tearDown() } func testDefaultPocketViewModelProtocolValues_withEmptyData() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/PrivateHomepageViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/PrivateHomepageViewControllerTests.swift index 3c8c2bde3d4f..b39d8be131b0 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/PrivateHomepageViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/PrivateHomepageViewControllerTests.swift @@ -16,8 +16,8 @@ final class PrivateHomepageViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testPrivateHomepageViewController_simpleCreation_hasNoLeaks() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/ContileProviderTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/ContileProviderTests.swift index 1db8420b3f64..77b471a6fe54 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/ContileProviderTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/ContileProviderTests.swift @@ -16,8 +16,8 @@ class ContileProviderTests: XCTestCase { } override func tearDown() { - super.tearDown() networking = nil + super.tearDown() } func testErrorResponse_failsWithError() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/SponsoredTileDataUtilityTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/SponsoredTileDataUtilityTests.swift index fd1867cabf88..c752aeac06ed 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/SponsoredTileDataUtilityTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/SponsoredTileDataUtilityTests.swift @@ -36,8 +36,8 @@ class SponsoredTileDataUtilityTests: XCTestCase { } override func tearDown() { - super.tearDown() subject = nil + super.tearDown() } // MARK: Tests diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/TopSitesDataAdaptorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/TopSitesDataAdaptorTests.swift index bc3a9d17c38a..8b6097c00d6d 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/TopSitesDataAdaptorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/TopSitesDataAdaptorTests.swift @@ -26,13 +26,12 @@ class TopSitesDataAdaptorTests: XCTestCase, FeatureFlaggable { } override func tearDown() { - super.tearDown() - notificationCenter = nil contileProviderMock = nil profile.prefs.clearAll() profile.shutdown() profile = nil + super.tearDown() } func testData_whenNotLoaded() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/TopSitesViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/TopSitesViewModelTests.swift index 1ff03ef7f647..14f1f4abee38 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/TopSitesViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Home/TopSites/TopSitesViewModelTests.swift @@ -20,9 +20,9 @@ class TopSitesViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() self.profile.shutdown() self.profile = nil + super.tearDown() } func testDeletionOfSingleSuggestedSite() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/SyncContentSettingsViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/SyncContentSettingsViewControllerTests.swift index 15abbb8ec21a..8e856bac4832 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/SyncContentSettingsViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/SyncContentSettingsViewControllerTests.swift @@ -21,10 +21,10 @@ class SyncContentSettingsViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() profile = nil syncContentSettingsVC = nil + super.tearDown() } func test_syncContentSettingsViewController_generateSettingsCount() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Theme/ThemableTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Theme/ThemableTests.swift index a8440bbdb144..64b9de53aaba 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Theme/ThemableTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Frontend/Theme/ThemableTests.swift @@ -17,9 +17,9 @@ class ThemableTests: XCTestCaseRootViewController { } override func tearDown() { - super.tearDown() tableViewDelegate = nil testThemable = nil + super.tearDown() } // MARK: Get all subviews diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/GridTabViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/GridTabViewControllerTests.swift index 9874d507e340..297c56120b62 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/GridTabViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/GridTabViewControllerTests.swift @@ -19,10 +19,10 @@ final class LegacyGridTabViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() profile = nil manager = nil + super.tearDown() } func testGridTabViewControllerDeinit() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/AccountSyncHandlerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/AccountSyncHandlerTests.swift index 7449e1743783..2a3df24231a6 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/AccountSyncHandlerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/AccountSyncHandlerTests.swift @@ -22,10 +22,10 @@ class AccountSyncHandlerTests: XCTestCase { } override func tearDown() { - super.tearDown() self.syncManager = nil self.profile = nil self.queue = nil + super.tearDown() } func testTabDidGainFocus_doesntSyncWithoutAccount() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/IntroScreenManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/IntroScreenManagerTests.swift index 8622a0870c67..7fe7dd840ce7 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/IntroScreenManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/IntroScreenManagerTests.swift @@ -16,8 +16,8 @@ final class IntroScreenManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() prefs = nil + super.tearDown() } func testHasntSeenIntroScreenYet_shouldShowIt() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/NotificationManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/NotificationManagerTests.swift index f75f58bcb988..d726f92f0814 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/NotificationManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/NotificationManagerTests.swift @@ -16,9 +16,9 @@ class NotificationManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() center = nil notificationManager = nil + super.tearDown() } func testRequestAuthorization() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/RatingPromptManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/RatingPromptManagerTests.swift index 00743bbadb60..812aa900e18e 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/RatingPromptManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/RatingPromptManagerTests.swift @@ -29,8 +29,6 @@ class RatingPromptManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() - createdGuids = [] promptManager?.reset() promptManager = nil @@ -38,6 +36,7 @@ class RatingPromptManagerTests: XCTestCase { mockProfile = nil logger = nil urlOpenerSpy = nil + super.tearDown() } func testShouldShowPrompt_requiredAreFalse_returnsFalse() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/HistoryHighlights/HistoryHighlightsManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/HistoryHighlights/HistoryHighlightsManagerTests.swift index efa0aa41ddd8..f45d81f83425 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/HistoryHighlights/HistoryHighlightsManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/HistoryHighlights/HistoryHighlightsManagerTests.swift @@ -31,13 +31,12 @@ class HistoryHighlightsTests: XCTestCase { } override func tearDown() { - super.tearDown() - manager = nil profile.shutdown() profile = nil entryProvider = nil DependencyHelperMock().reset() + super.tearDown() } func testEmptyRead() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/LegacyRemoteTabsPanelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/LegacyRemoteTabsPanelTests.swift index a545f5a22606..3fcac3adc5bb 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/LegacyRemoteTabsPanelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/LegacyRemoteTabsPanelTests.swift @@ -16,8 +16,8 @@ class LegacyRemoteTabsPanelTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() + super.tearDown() } // MARK: States of panel diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/Bookmarks/BookmarkPanelViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/Bookmarks/BookmarkPanelViewModelTests.swift index 485fe11a57d9..7809f4612cba 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/Bookmarks/BookmarkPanelViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/Bookmarks/BookmarkPanelViewModelTests.swift @@ -18,8 +18,8 @@ class BookmarksPanelViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil + super.tearDown() } func testIsRootNode_falseWhenMenu() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/Bookmarks/Legacy/LegacyBookmarksPanelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/Bookmarks/Legacy/LegacyBookmarksPanelTests.swift index cb4dd0405f22..20f4f51ef84f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/Bookmarks/Legacy/LegacyBookmarksPanelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/Bookmarks/Legacy/LegacyBookmarksPanelTests.swift @@ -17,8 +17,8 @@ class LegacyBookmarksPanelTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } // MARK: Bottom left action diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/DownloadsPanelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/DownloadsPanelTests.swift index 17ee71a8b1df..2c4a212cb777 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/DownloadsPanelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/DownloadsPanelTests.swift @@ -16,8 +16,8 @@ class DownloadsPanelTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testDownloadsPanelButtons() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/DownloadsPanelViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/DownloadsPanelViewModelTests.swift index f2c00d762476..77b3a605b6ba 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/DownloadsPanelViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/DownloadsPanelViewModelTests.swift @@ -16,8 +16,8 @@ class DownloadsPanelViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() fileFetcher = nil + super.tearDown() } func testReloadData_WithResults() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/HistoryPanelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/HistoryPanelTests.swift index a7359f5de152..4c46e323e126 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/HistoryPanelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/HistoryPanelTests.swift @@ -16,8 +16,8 @@ class HistoryPanelTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testHistoryButtons() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/HistoryPanelViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/HistoryPanelViewModelTests.swift index 6ed32b3e8023..de8fd78e6ee4 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/HistoryPanelViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/HistoryPanelViewModelTests.swift @@ -25,13 +25,12 @@ class HistoryPanelViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() - AppContainer.shared.reset() clear(profile: profile) profile.shutdown() profile = nil subject = nil + super.tearDown() } func testHistorySectionTitle() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/LibraryViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/LibraryViewModelTests.swift index 2f4f3d49fc2a..57d71b4b16fc 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/LibraryViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/LibraryViewModelTests.swift @@ -20,10 +20,10 @@ class LibraryViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() profile.shutdown() profile = nil + super.tearDown() } func testInitialState_Init() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/ReadingListPanelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/ReadingListPanelTests.swift index 218d8c15a1cf..4b7d5b059b85 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/ReadingListPanelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Library/ReadingListPanelTests.swift @@ -15,8 +15,8 @@ class ReadingListPanelTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testReaderPanelButtons() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/LibraryPanelViewStateTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/LibraryPanelViewStateTests.swift index 6a9879e32e6b..6ac2b8d92f28 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/LibraryPanelViewStateTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/LibraryPanelViewStateTests.swift @@ -14,8 +14,8 @@ class LibraryPanelViewStateTests: XCTestCase { } override func tearDown() { - super.tearDown() panelState = nil + super.tearDown() } // MARK: - Single panel interaction tests diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/GleanPlumbMessageManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/GleanPlumbMessageManagerTests.swift index b3192d352fc0..995f4aa10ac7 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/GleanPlumbMessageManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/GleanPlumbMessageManagerTests.swift @@ -29,10 +29,9 @@ class GleanPlumbMessageManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() - messagingStore = nil subject = nil + super.tearDown() } func testMessagingFeatureIsCoenrolling() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/GleanPlumbMessageStoreTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/GleanPlumbMessageStoreTests.swift index c084f0e00f62..62e27c19e386 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/GleanPlumbMessageStoreTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/GleanPlumbMessageStoreTests.swift @@ -17,9 +17,9 @@ class GleanPlumbMessageStoreTests: XCTestCase { } override func tearDown() { - super.tearDown() resetUserDefaults() subject = nil + super.tearDown() } func testImpression_OnMessageDisplayed() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/NimbusMessagingMessageTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/NimbusMessagingMessageTests.swift index 910ba53d177f..e83756282e32 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/NimbusMessagingMessageTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/NimbusMessagingMessageTests.swift @@ -17,8 +17,8 @@ final class NimbusMessagingMessageTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() + super.tearDown() } lazy var feature = { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/NimbusMessagingTriggerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/NimbusMessagingTriggerTests.swift index c01f1afb2699..c9f429440692 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/NimbusMessagingTriggerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Messaging/NimbusMessagingTriggerTests.swift @@ -18,8 +18,8 @@ final class NimbusMessagingTriggerTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() + super.tearDown() } lazy var feature: Messaging = { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/MicrosurveyCoordinatorTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/MicrosurveyCoordinatorTests.swift index 822bcaeda8b1..c243a69c6f7d 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/MicrosurveyCoordinatorTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/MicrosurveyCoordinatorTests.swift @@ -19,8 +19,8 @@ final class MicrosurveyCoordinatorTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() + super.tearDown() } func testInitialState() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/MicrosurveySurfaceManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/MicrosurveySurfaceManagerTests.swift index 8cce3a7bc642..674fe4833300 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/MicrosurveySurfaceManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/MicrosurveySurfaceManagerTests.swift @@ -16,9 +16,9 @@ final class MicrosurveySurfaceManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() messageManager = nil AppContainer.shared.reset() + super.tearDown() } func testNilMessage_microsurveyShouldNotShow() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/Mock/MicrosurveyPromptMiddlewareTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/Mock/MicrosurveyPromptMiddlewareTests.swift index 5a51d81845de..9e8f46fb07c8 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/Mock/MicrosurveyPromptMiddlewareTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Microsurvey/Mock/MicrosurveyPromptMiddlewareTests.swift @@ -29,8 +29,8 @@ final class MicrosurveyPromptMiddlewareTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testShowPromptAction_withInvalidModel() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockTests/ClientSyncManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockTests/ClientSyncManagerTests.swift index a570dfa244e2..e81b954a8818 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockTests/ClientSyncManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockTests/ClientSyncManagerTests.swift @@ -17,8 +17,8 @@ final class ClientSyncManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() sut = nil + super.tearDown() } func testCreditCardEngineEnablement_WhenMockDeclinedEnginesIsNilAndMockEngineEnabledIsFalse() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/NativeErrorPage/NativeErrorPageViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/NativeErrorPage/NativeErrorPageViewControllerTests.swift index 2e6d6a374f62..728a7b32dcb4 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/NativeErrorPage/NativeErrorPageViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/NativeErrorPage/NativeErrorPageViewControllerTests.swift @@ -16,8 +16,8 @@ final class NativeErrorPageViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testNativeErrorPageViewController_simpleCreation_hasNoLeaks() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/NotificationSurface/NotificationSurfaceManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/NotificationSurface/NotificationSurfaceManagerTests.swift index ba814be9345f..3817302c8fed 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/NotificationSurface/NotificationSurfaceManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/NotificationSurface/NotificationSurfaceManagerTests.swift @@ -19,9 +19,9 @@ class NotificationSurfaceManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() messageManager = nil notificationManager = nil + super.tearDown() } func testShouldShowSurface_noMessage() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/NotificationSurface/OnboardingNotificationCardHelperTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/NotificationSurface/OnboardingNotificationCardHelperTests.swift index 387d56bd4440..1f5303818eda 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/NotificationSurface/OnboardingNotificationCardHelperTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/NotificationSurface/OnboardingNotificationCardHelperTests.swift @@ -20,9 +20,9 @@ class OnboardingNotificationCardHelperTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() nimbusUtility = nil + super.tearDown() } func testHelper_fromOnboarding_withNotificationCard_returnsTrue() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/IntroViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/IntroViewControllerTests.swift index 21b2fe30f5ac..8085d5c1a6b3 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/IntroViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/IntroViewControllerTests.swift @@ -17,8 +17,8 @@ class IntroViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() mockNotificationCenter = nil + super.tearDown() } // Temp. Disabled: https://mozilla-hub.atlassian.net/browse/FXIOS-7505 diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/IntroViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/IntroViewModelTests.swift index 3954895c34e1..e64bfbfe7ea8 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/IntroViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/IntroViewModelTests.swift @@ -19,8 +19,8 @@ class IntroViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() nimbusUtility = nil + super.tearDown() } func testModel_whenInitialized_hasNoViewControllers() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/NimbusOnboardingFeatureLayerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/NimbusOnboardingFeatureLayerTests.swift index ec7c400ccd4f..fa76a7800551 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/NimbusOnboardingFeatureLayerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/NimbusOnboardingFeatureLayerTests.swift @@ -20,8 +20,8 @@ class NimbusOnboardingFeatureLayerTests: XCTestCase { } override func tearDown() { - super.tearDown() configUtility = nil + super.tearDown() } // MARK: - Test placeholder methods diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/OnboardingButtonActionTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/OnboardingButtonActionTests.swift index 9a0ebab40553..84d81408d5aa 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/OnboardingButtonActionTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/OnboardingButtonActionTests.swift @@ -17,8 +17,8 @@ class OnboardingButtonActionTests: XCTestCase { } override func tearDown() { - super.tearDown() mockDelegate = nil + super.tearDown() } func testMockDelegate_whenInitialized_actionIsNil() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/OnboardingViewControllerProtocolTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/OnboardingViewControllerProtocolTests.swift index a1679fe64adc..1fc20c95a982 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/OnboardingViewControllerProtocolTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/OnboardingViewControllerProtocolTests.swift @@ -18,8 +18,8 @@ class OnboardingViewControllerProtocolTests: XCTestCase { } override func tearDown() { - super.tearDown() nimbusUtility = nil + super.tearDown() } // MARK: - Test `getNextOnboardingCard` forward diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/UpdateViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/UpdateViewModelTests.swift index 94c05751ede2..ba64513dce4b 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/UpdateViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/UpdateViewModelTests.swift @@ -19,8 +19,8 @@ class UpdateViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil + super.tearDown() } // MARK: Enable cards diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OverlayModeManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OverlayModeManagerTests.swift index a338aa1e45c7..9f8f38addd49 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OverlayModeManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OverlayModeManagerTests.swift @@ -16,9 +16,9 @@ class OverlayModeManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() urlBar = nil subject = nil + super.tearDown() } // MARK: - Test URLBarView nil diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/PasswordManagerSelectionHelperTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/PasswordManagerSelectionHelperTests.swift index 382d402acc0c..6da51fd3e0a2 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/PasswordManagerSelectionHelperTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/PasswordManagerSelectionHelperTests.swift @@ -23,8 +23,8 @@ class PasswordManagerSelectionHelperTests: XCTestCase { } override func tearDown() { - super.tearDown() selectionHelper = nil + super.tearDown() } func testSelectCellFromLoginRecord() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/PrefsTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/PrefsTests.swift index 5422027d1866..873712e40ed2 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/PrefsTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/PrefsTests.swift @@ -18,8 +18,8 @@ class PrefsTests: XCTestCase { override func tearDown() { prefs.clearAll() - super.tearDown() prefs = nil + super.tearDown() } func testClearPrefs() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/ProfileTest.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/ProfileTest.swift index 48c5e44f0509..63f248d325fb 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/ProfileTest.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/ProfileTest.swift @@ -26,8 +26,8 @@ class ProfileTest: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil + super.tearDown() } func withTestProfile(_ callback: (_ profile: Client.Profile) -> Void) { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/ReaderModeStyleTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/ReaderModeStyleTests.swift index d20078d7d048..172d092ec9f2 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/ReaderModeStyleTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/ReaderModeStyleTests.swift @@ -18,9 +18,9 @@ class ReaderModeStyleTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() themeManager = nil + super.tearDown() } func test_initWithProperties_succeeds() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/RustSyncManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/RustSyncManagerTests.swift index a12b033ebe98..2500e696627f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/RustSyncManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/RustSyncManagerTests.swift @@ -39,7 +39,6 @@ class RustSyncManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() rustSyncManager = nil UserDefaults.standard.removeObject(forKey: "fxa.cwts.declinedSyncEngines") profile.prefs.removeObjectForKey(Keys.bookmarksStateChangedPrefKey) @@ -56,6 +55,7 @@ class RustSyncManagerTests: XCTestCase { profile.prefs.removeObjectForKey(Keys.addressesStateChangedPrefKey) profile = nil + super.tearDown() } func testGetEnginesAndKeys() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Search/SearchViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Search/SearchViewControllerTests.swift index b4e8cad3d786..9175344076df 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Search/SearchViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Search/SearchViewControllerTests.swift @@ -43,8 +43,8 @@ class SearchViewControllerTest: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil + super.tearDown() } func testHistoryAndBookmarksAreFilteredWhenShowSponsoredSuggestionsIsTrue() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Search/SearchViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Search/SearchViewModelTests.swift index 366c47886503..7a1d6d349aeb 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Search/SearchViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Search/SearchViewModelTests.swift @@ -44,8 +44,8 @@ final class SearchViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil + super.tearDown() } func testFirefoxSuggestionReturnsNoSuggestions() async throws { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/AppSettingsTableViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/AppSettingsTableViewControllerTests.swift index 2d4c87f3780a..4e6354787c32 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/AppSettingsTableViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/AppSettingsTableViewControllerTests.swift @@ -26,13 +26,13 @@ class AppSettingsTableViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() self.profile = nil self.tabManager = nil self.appAuthenticator = nil self.delegate = nil self.applicationHelper = nil + super.tearDown() } func testRouteNotHandled_delegatesArentCalled() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/HomePageSettingViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/HomePageSettingViewControllerTests.swift index 5a11d1c892f6..798948414adc 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/HomePageSettingViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/HomePageSettingViewControllerTests.swift @@ -20,10 +20,10 @@ final class HomePageSettingViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() self.profile = nil self.delegate = nil + super.tearDown() } func testHomePageSettingsLeaks_InitCall() throws { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/SearchBarSettingsViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/SearchBarSettingsViewModelTests.swift index 4112c7ac6d5f..744a7f43a02b 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/SearchBarSettingsViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/SearchBarSettingsViewModelTests.swift @@ -22,10 +22,10 @@ class SearchBarSettingsViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() prefs.clearAll() prefs = nil mockNotificationCenter = nil + super.tearDown() } // MARK: Default diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/ThemeSettingsControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/ThemeSettingsControllerTests.swift index 989ac8202c52..d259c1b2d774 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/ThemeSettingsControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/ThemeSettingsControllerTests.swift @@ -16,8 +16,8 @@ class ThemeSettingsControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testUseSystemAppearance_WithRedux() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/VersionSettingTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/VersionSettingTests.swift index 4f32e57c4e05..6cf6b874e87f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/VersionSettingTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Settings/VersionSettingTests.swift @@ -19,9 +19,9 @@ class VersionSettingTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() delegate = nil + super.tearDown() } func testCopyAppVersion() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/ShoppingProductTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/ShoppingProductTests.swift index db97add6093d..3ef88c3f6623 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/ShoppingProductTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/ShoppingProductTests.swift @@ -15,8 +15,8 @@ final class ShoppingProductTests: XCTestCase { } override func tearDown() { - super.tearDown() client = nil + super.tearDown() } func testAmazonURL_returnsExpectedProduct() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/SponsoredTileTelemetryTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/SponsoredTileTelemetryTests.swift index 13dda51927db..e02d70248e7c 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/SponsoredTileTelemetryTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/SponsoredTileTelemetryTests.swift @@ -14,8 +14,8 @@ class SponsoredTileTelemetryTests: XCTestCase { } override func tearDown() { - super.tearDown() clearTest() + super.tearDown() } // MARK: Impression diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/StartAtHomeHelperTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/StartAtHomeHelperTests.swift index b6e8def79df4..8716c5871749 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/StartAtHomeHelperTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/StartAtHomeHelperTests.swift @@ -25,13 +25,12 @@ class StartAtHomeHelperTests: XCTestCase { } override func tearDown() { - super.tearDown() - profile = nil tabManager = nil helper = nil DependencyHelperMock().reset() + super.tearDown() } func testShouldNotSkipStartAtHome() throws { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/StatusBarOverlayTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/StatusBarOverlayTests.swift index d6f6dd83424b..9bd6c6be273e 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/StatusBarOverlayTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/StatusBarOverlayTests.swift @@ -22,10 +22,10 @@ class StatusBarOverlayTests: XCTestCase { } override func tearDown() { - super.tearDown() self.profile = nil self.wallpaperManager = nil self.notificationCenter = nil + super.tearDown() } func testInitialState_isOpaque() throws { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/SurveySurface/SurveySurfaceManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/SurveySurface/SurveySurfaceManagerTests.swift index 8bb80c6e7a61..c861b8e34077 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/SurveySurface/SurveySurfaceManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/SurveySurface/SurveySurfaceManagerTests.swift @@ -20,8 +20,8 @@ class SurveySurfaceManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() messageManager = nil + super.tearDown() } func testNilMessage_surveySurfaceShouldNotShow() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TPStatsBlocklistsTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TPStatsBlocklistsTests.swift index 0090cf890bb4..ed56822145d1 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TPStatsBlocklistsTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TPStatsBlocklistsTests.swift @@ -16,8 +16,8 @@ class TPStatsBlocklistsTests: XCTestCase { } override func tearDown() { - super.tearDown() blocklists = nil + super.tearDown() } func testLoadPerformance() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabCellTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabCellTests.swift index 9243d57223f6..3d791c1a8ffc 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabCellTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabCellTests.swift @@ -16,9 +16,9 @@ class TabCellTests: XCTestCase { } override func tearDown() { - super.tearDown() cellDelegate = nil profile = nil + super.tearDown() } func testTabCellDeinit() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/Tab+ChangeUserAgentTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/Tab+ChangeUserAgentTests.swift index 513aa44524f9..346654eed9c2 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/Tab+ChangeUserAgentTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/Tab+ChangeUserAgentTests.swift @@ -24,8 +24,8 @@ class ChangeUserAgentTests: XCTestCase { } override func tearDown() { - super.tearDown() testFile = nil + super.tearDown() } func testUpdateAndContainsDidChangeUANotPrivate() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/TabMetadataManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/TabMetadataManagerTests.swift index d526f44e640a..904e27c31206 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/TabMetadataManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/TabMetadataManagerTests.swift @@ -21,10 +21,9 @@ class TabMetadataManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() - metadataObserver = nil manager = nil + super.tearDown() } // MARK: - Should Update Search Term Data diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/TabsTelemetryTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/TabsTelemetryTests.swift index ccf1df84e1e2..dfc4f44a5b7f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/TabsTelemetryTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/Legacy/TabsTelemetryTests.swift @@ -23,9 +23,8 @@ class TabsTelemetryTests: XCTestCase { } override func tearDown() { - super.tearDown() - profile = nil + super.tearDown() } func testTrackTabsQuantity_withNormalTab_gleanIsCalled() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/TabManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/TabManagerTests.swift index 3cd390cec364..0e4356c98190 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/TabManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/TabManagerTests.swift @@ -42,11 +42,11 @@ class TabManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() mockProfile = nil mockDiskImageStore = nil mockTabStore = nil mockSessionStore = nil + super.tearDown() } // MARK: - Restore tabs diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/TabMigrationUtilityTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/TabMigrationUtilityTests.swift index af4699410163..4f837e615e38 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/TabMigrationUtilityTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabManagement/TabMigrationUtilityTests.swift @@ -21,9 +21,9 @@ class TabMigrationUtilityTests: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil tabDataStore = nil + super.tearDown() } func testShouldRunMigration_OnlyOnce() async { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTests.swift index 9d24ca4c3d93..d7d4fe8b1b06 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTests.swift @@ -23,8 +23,8 @@ class TabTests: XCTestCase { } override func tearDown() { - super.tearDown() tabDelegate = nil + super.tearDown() } func testShareURL_RemovingReaderModeComponents() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/InactiveTabsManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/InactiveTabsManagerTests.swift index ca3a835890bf..57a00147822f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/InactiveTabsManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/InactiveTabsManagerTests.swift @@ -23,9 +23,9 @@ final class InactiveTabsManagerTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() profile = nil + super.tearDown() } func testEmptyInactiveTabs_ForRegularTabs() throws { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/Legacy/LegacyTabTrayViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/Legacy/LegacyTabTrayViewControllerTests.swift index 78ca535f333d..5b1305349152 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/Legacy/LegacyTabTrayViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/Legacy/LegacyTabTrayViewControllerTests.swift @@ -39,8 +39,6 @@ final class LegacyTabTrayViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() - AppContainer.shared.reset() profile = nil manager = nil @@ -48,6 +46,7 @@ final class LegacyTabTrayViewControllerTests: XCTestCase { overlayManager = nil tabTray = nil gridTab = nil + super.tearDown() } @MainActor diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/Legacy/TabLocationViewTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/Legacy/TabLocationViewTests.swift index ce9ef8304551..364fa84f08fa 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/Legacy/TabLocationViewTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/Legacy/TabLocationViewTests.swift @@ -13,8 +13,8 @@ class TabLocationViewTests: XCTestCase { } override func tearDown() { - super.tearDown() AppContainer.shared.reset() + super.tearDown() } func testDelegateMemoryLeak() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/RemoteTabPanelStateTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/RemoteTabPanelStateTests.swift index ce3b622f1c0e..31dc79fd685a 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/RemoteTabPanelStateTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/RemoteTabPanelStateTests.swift @@ -17,8 +17,8 @@ final class RemoteTabPanelStateTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testTabsRefreshSkippedIfNotAllowed() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/RemoteTabPanelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/RemoteTabPanelTests.swift index 1c6b0df3c447..358ef062d5f7 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/RemoteTabPanelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/RemoteTabPanelTests.swift @@ -16,8 +16,8 @@ final class RemoteTabPanelTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testTableView_emptyStateNoRows() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabDisplayPanelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabDisplayPanelTests.swift index 452a1e1983b8..b550c4838745 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabDisplayPanelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabDisplayPanelTests.swift @@ -13,8 +13,8 @@ final class TabDisplayPanelTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testExpandedInactiveTabs_InitialState() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabDisplayViewTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabDisplayViewTests.swift index dcbe13a0a19d..695c477ff09e 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabDisplayViewTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabDisplayViewTests.swift @@ -16,9 +16,9 @@ final class TabDisplayViewTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() profile = nil + super.tearDown() } func testNumberOfSections_ForRegularTabsWithInactiveTabs() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabTrayViewControllerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabTrayViewControllerTests.swift index 663a87d84e01..a2818f50b664 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabTrayViewControllerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabTrayViewControllerTests.swift @@ -24,10 +24,10 @@ final class TabTrayViewControllerTests: XCTestCase { } override func tearDown() { - super.tearDown() delegate = nil navigationController = nil DependencyHelperMock().reset() + super.tearDown() } // MARK: Compact layout diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabsPanelStateTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabsPanelStateTests.swift index 4f37180fdc48..1fa949d6d9b5 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabsPanelStateTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabTray/TabsPanelStateTests.swift @@ -17,8 +17,8 @@ final class TabPanelStateTests: XCTestCase { } override func tearDown() { - super.tearDown() DependencyHelperMock().reset() + super.tearDown() } func testTabsState_DidLoadTabPanel() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabWebViewTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabWebViewTests.swift index 5067d83319e6..4397176f4a83 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabWebViewTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TabWebViewTests.swift @@ -25,10 +25,10 @@ class TabWebViewTests: XCTestCaseRootViewController, UIGestureRecognizerDelegate } override func tearDown() { - super.tearDown() navigationDelegate = nil tabWebViewDelegate = nil DependencyHelperMock().reset() + super.tearDown() } func testBasicTabWebView_doesntLeak() async throws { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TelemetryContextualIdentifierTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TelemetryContextualIdentifierTests.swift index c2950432768a..bd209e557c96 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TelemetryContextualIdentifierTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TelemetryContextualIdentifierTests.swift @@ -14,8 +14,8 @@ class TelemetryContextualIdentifierTests: XCTestCase { } override func tearDown() { - super.tearDown() clearTest() + super.tearDown() } // MARK: Context id diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Toolbar/AddressToolbarContainerModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Toolbar/AddressToolbarContainerModelTests.swift index 53daab9d37f0..ed753146ac56 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Toolbar/AddressToolbarContainerModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Toolbar/AddressToolbarContainerModelTests.swift @@ -52,10 +52,10 @@ class AddressToolbarContainerModelTests: XCTestCase { } override func tearDown() { - super.tearDown() viewModel = nil mockProfile = nil engines = nil + super.tearDown() } func testSearchWordFromURLWhenUrlIsNilThenSearchWordIsNil() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TrackingProtectionTests/CertificatesViewModelTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TrackingProtectionTests/CertificatesViewModelTests.swift index dd895cddd805..45da4785e69c 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TrackingProtectionTests/CertificatesViewModelTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TrackingProtectionTests/CertificatesViewModelTests.swift @@ -19,8 +19,8 @@ final class CertificatesViewModelTests: XCTestCase { } override func tearDown() { - super.tearDown() viewModel = nil + super.tearDown() } func testGetCertificateValues() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TrackingProtectionTests/TrackingProtectionStateTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TrackingProtectionTests/TrackingProtectionStateTests.swift index d73351e60114..d9eafd6d72bc 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/TrackingProtectionTests/TrackingProtectionStateTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/TrackingProtectionTests/TrackingProtectionStateTests.swift @@ -17,8 +17,8 @@ final class TrackingProtectionStateTests: XCTestCase { } override func tearDown() { - super.tearDown() mockProfile = nil + super.tearDown() } func testDismissSurveyAction() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/CumulativeDaysOfUseCounterTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/CumulativeDaysOfUseCounterTests.swift index 3fee1db96bf3..4b5f910b457c 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/CumulativeDaysOfUseCounterTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/CumulativeDaysOfUseCounterTests.swift @@ -18,9 +18,9 @@ class CumulativeDaysOfUseCounterTests: XCTestCase { } override func tearDown() { - super.tearDown() counter = nil calendar = nil + super.tearDown() } func testByDefaultCounter_isFalse() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/DefaultBackgroundTabLoaderTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/DefaultBackgroundTabLoaderTests.swift index 05951927a764..636e65a8337e 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/DefaultBackgroundTabLoaderTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/DefaultBackgroundTabLoaderTests.swift @@ -17,9 +17,9 @@ class DefaultBackgroundTabLoaderTests: XCTestCase { } override func tearDown() { - super.tearDown() self.applicationHelper = nil self.tabQueue = nil + super.tearDown() } func testLoadBackgroundTabs_noTabs_doesntLoad() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/GeneralizedImageFetcherTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/GeneralizedImageFetcherTests.swift index 4383b79be6a6..7af870c7086b 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/GeneralizedImageFetcherTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/GeneralizedImageFetcherTests.swift @@ -15,9 +15,8 @@ class GeneralizedImageFetcherTests: XCTestCase { } override func tearDown() { - super.tearDown() - clearState() + super.tearDown() } func testErrorResponse() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/SponsoredContentFilterUtilityTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/SponsoredContentFilterUtilityTests.swift index 59ec8b8735ad..f19bb1be0d21 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/SponsoredContentFilterUtilityTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Utils/SponsoredContentFilterUtilityTests.swift @@ -23,8 +23,8 @@ class SponsoredContentFilterUtilityTests: XCTestCase { } override func tearDown() { - super.tearDown() profile = nil + super.tearDown() } // MARK: - Sites diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperDataServiceTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperDataServiceTests.swift index f7307dae2f43..5e0334031b6a 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperDataServiceTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperDataServiceTests.swift @@ -18,8 +18,8 @@ class WallpaperDataServiceTests: XCTestCase, WallpaperTestDataProvider { } override func tearDown() { - super.tearDown() networking = nil + super.tearDown() } // MARK: - Test metadata functions diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperMigrationUtilityTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperMigrationUtilityTests.swift index 742d00645344..d6788927ce7c 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperMigrationUtilityTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperMigrationUtilityTests.swift @@ -15,8 +15,8 @@ class WallpaperMigrationUtilityTests: XCTestCase { } override func tearDown() { - super.tearDown() removeAllFolders() + super.tearDown() } func testRemovingAllFoldersOnSetup() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperNetworkingTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperNetworkingTests.swift index 7b1ea189db44..bf8b9009dfdc 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperNetworkingTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Wallpaper/WallpaperNetworkingTests.swift @@ -16,8 +16,8 @@ class WallpaperNetworkingTests: XCTestCase { } override func tearDown() { - super.tearDown() networking = nil + super.tearDown() } func testSetupWorksAsExpected() async { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/WebServerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/WebServerTests.swift index 5b3dbc4c0c46..8e7507aeb21f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/WebServerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/WebServerTests.swift @@ -34,9 +34,9 @@ class WebServerTests: XCTestCase { } override func tearDown() { - super.tearDown() webServer = nil webServerBase = nil + super.tearDown() } func testWebServerIsRunning() { diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/XCTestCaseRootViewController.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/XCTestCaseRootViewController.swift index 56c801c0b185..19bd9ca8e8b0 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/XCTestCaseRootViewController.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/XCTestCaseRootViewController.swift @@ -15,9 +15,9 @@ class XCTestCaseRootViewController: XCTestCase { } override func tearDown() { - super.tearDown() rootViewController = nil window = nil + super.tearDown() } func loadViewForTesting() { diff --git a/firefox-ios/firefox-ios-tests/Tests/StorageTests/TestSQLitePinnedSites.swift b/firefox-ios/firefox-ios-tests/Tests/StorageTests/TestSQLitePinnedSites.swift index f8c9278c7fc5..059079608c25 100644 --- a/firefox-ios/firefox-ios-tests/Tests/StorageTests/TestSQLitePinnedSites.swift +++ b/firefox-ios/firefox-ios-tests/Tests/StorageTests/TestSQLitePinnedSites.swift @@ -18,8 +18,8 @@ class TestSQLitePinnedSites: XCTestCase { } override func tearDown() { - super.tearDown() self.deleteDatabases() + super.tearDown() } override func setUp() { diff --git a/firefox-ios/firefox-ios-tests/Tests/StorageTests/TestSwiftData.swift b/firefox-ios/firefox-ios-tests/Tests/StorageTests/TestSwiftData.swift index ca26786b5ba4..77f155a28f27 100644 --- a/firefox-ios/firefox-ios-tests/Tests/StorageTests/TestSwiftData.swift +++ b/firefox-ios/firefox-ios-tests/Tests/StorageTests/TestSwiftData.swift @@ -32,9 +32,9 @@ class TestSwiftData: XCTestCase { } override func tearDown() { - super.tearDown() // Restore static flags to their default values. SwiftData.EnableWAL = true + super.tearDown() } func testNoWAL() { diff --git a/firefox-ios/firefox-ios-tests/Tests/StorageTests/ZoomLevelStoreTests.swift b/firefox-ios/firefox-ios-tests/Tests/StorageTests/ZoomLevelStoreTests.swift index 497c93ad5cd3..22db742c9753 100644 --- a/firefox-ios/firefox-ios-tests/Tests/StorageTests/ZoomLevelStoreTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/StorageTests/ZoomLevelStoreTests.swift @@ -20,9 +20,9 @@ final class ZoomLevelStoreTests: XCTestCase { } override func tearDown() { - super.tearDown() zoomLevelStore = nil cleanUp() + super.tearDown() } private func cleanUp() { diff --git a/firefox-ios/firefox-ios-tests/Tests/UITests/ClearPrivateDataTests.swift b/firefox-ios/firefox-ios-tests/Tests/UITests/ClearPrivateDataTests.swift index f998033c62b2..98db5c231cfb 100644 --- a/firefox-ios/firefox-ios-tests/Tests/UITests/ClearPrivateDataTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/UITests/ClearPrivateDataTests.swift @@ -21,6 +21,7 @@ class ClearPrivateDataTests: KIFTestCase, UITextFieldDelegate { override func tearDown() { BrowserUtils.resetToAboutHomeKIF(tester()) + super.tearDown() } func visitSites(noOfSites: Int) -> [(title: String, domain: String, dispDomain: String, url: String)] { diff --git a/firefox-ios/firefox-ios-tests/Tests/UITests/DomainAutocompleteTests.swift b/firefox-ios/firefox-ios-tests/Tests/UITests/DomainAutocompleteTests.swift index a4ba3780750a..ffd57a5756b8 100644 --- a/firefox-ios/firefox-ios-tests/Tests/UITests/DomainAutocompleteTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/UITests/DomainAutocompleteTests.swift @@ -113,10 +113,10 @@ class DomainAutocompleteTests: KIFTestCase { } override func tearDown() { - super.tearDown() tester().tapView(withAccessibilityIdentifier: "urlBar-cancel") BrowserUtils.resetToAboutHomeKIF(tester()) tester().wait(forTimeInterval: 3) BrowserUtils.clearPrivateDataKIF(tester()) + super.tearDown() } } diff --git a/firefox-ios/firefox-ios-tests/Tests/UITests/LoginManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/UITests/LoginManagerTests.swift index 263fbd626999..7d94d5ad3eaa 100644 --- a/firefox-ios/firefox-ios-tests/Tests/UITests/LoginManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/UITests/LoginManagerTests.swift @@ -18,10 +18,10 @@ class LoginManagerTests: KIFTestCase { } override func tearDown() { - super.tearDown() clearLogins() tester().wait(forTimeInterval: 5) BrowserUtils.resetToAboutHomeKIF(tester()) + super.tearDown() } fileprivate func openLoginManager() { diff --git a/firefox-ios/firefox-ios-tests/Tests/UITests/SessionRestoreTests.swift b/firefox-ios/firefox-ios-tests/Tests/UITests/SessionRestoreTests.swift index 2ec37af0ed18..5141417b8590 100644 --- a/firefox-ios/firefox-ios-tests/Tests/UITests/SessionRestoreTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/UITests/SessionRestoreTests.swift @@ -75,5 +75,6 @@ class SessionRestoreTests: KIFTestCase { BrowserUtils.resetToAboutHomeKIF(tester()) tester().wait(forTimeInterval: 3) BrowserUtils.clearPrivateDataKIF(tester()) + super.tearDown() } } diff --git a/firefox-ios/firefox-ios-tests/Tests/UITests/ToolbarTests.swift b/firefox-ios/firefox-ios-tests/Tests/UITests/ToolbarTests.swift index 727f8484b4f2..cb2225f8a0d8 100644 --- a/firefox-ios/firefox-ios-tests/Tests/UITests/ToolbarTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/UITests/ToolbarTests.swift @@ -69,5 +69,6 @@ class ToolbarTests: KIFTestCase, UITextFieldDelegate { BrowserUtils.resetToAboutHomeKIF(tester()) tester().wait(forTimeInterval: 3) BrowserUtils.clearPrivateDataKIF(tester()) + super.tearDown() } } diff --git a/firefox-ios/firefox-ios-tests/Tests/UITests/ViewMemoryLeakTests.swift b/firefox-ios/firefox-ios-tests/Tests/UITests/ViewMemoryLeakTests.swift index 5b5fe517d88b..10f6166d3bc7 100644 --- a/firefox-ios/firefox-ios-tests/Tests/UITests/ViewMemoryLeakTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/UITests/ViewMemoryLeakTests.swift @@ -24,6 +24,7 @@ class ViewMemoryLeakTests: KIFTestCase, UITextFieldDelegate { } catch _ { } BrowserUtils.resetToAboutHomeKIF(tester()) + super.tearDown() } /* func testSearchViewControllerDisposed() { diff --git a/firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift b/firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift index a0de584e0613..75f8c06d0d97 100644 --- a/firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/XCUITests/DragAndDropTests.swift @@ -21,10 +21,6 @@ let websiteWithSearchField = "https://developer.mozilla.org/en-US/" class DragAndDropTests: BaseTestCase { // Disable test suite since in theory it does not make sense with Chron tabs implementation - override func tearDown() { - XCUIDevice.shared.orientation = UIDeviceOrientation.portrait - super.tearDown() - } // https://mozilla.testrail.io/index.php?/cases/view/2362645 // Smoketest