Lock screen rotation for the camera (#2353)

This commit is contained in:
Mauro
2024-01-18 14:24:15 +01:00
committed by GitHub
parent 65e9c3baab
commit 3ae33f1309
19 changed files with 180 additions and 53 deletions
@@ -1632,6 +1632,41 @@ class NotificationSettingsProxyMock: NotificationSettingsProxyProtocol {
}
}
}
class OrientationManagerMock: OrientationManagerProtocol {
//MARK: - setOrientation
var setOrientationCallsCount = 0
var setOrientationCalled: Bool {
return setOrientationCallsCount > 0
}
var setOrientationReceivedOrientation: UIInterfaceOrientationMask?
var setOrientationReceivedInvocations: [UIInterfaceOrientationMask] = []
var setOrientationClosure: ((UIInterfaceOrientationMask) -> Void)?
func setOrientation(_ orientation: UIInterfaceOrientationMask) {
setOrientationCallsCount += 1
setOrientationReceivedOrientation = orientation
setOrientationReceivedInvocations.append(orientation)
setOrientationClosure?(orientation)
}
//MARK: - lockOrientation
var lockOrientationCallsCount = 0
var lockOrientationCalled: Bool {
return lockOrientationCallsCount > 0
}
var lockOrientationReceivedOrientation: UIInterfaceOrientationMask?
var lockOrientationReceivedInvocations: [UIInterfaceOrientationMask] = []
var lockOrientationClosure: ((UIInterfaceOrientationMask) -> Void)?
func lockOrientation(_ orientation: UIInterfaceOrientationMask) {
lockOrientationCallsCount += 1
lockOrientationReceivedOrientation = orientation
lockOrientationReceivedInvocations.append(orientation)
lockOrientationClosure?(orientation)
}
}
class PollInteractionHandlerMock: PollInteractionHandlerProtocol {
//MARK: - sendPollResponse