MockActionSheetItem.swift 700 B

123456789101112131415161718192021222324252627
  1. //
  2. // MockActionSheetItem.swift
  3. // SheeeeeeeeetTests
  4. //
  5. // Created by Daniel Saidi on 2018-10-17.
  6. // Copyright © 2018 Daniel Saidi. All rights reserved.
  7. //
  8. import Sheeeeeeeeet
  9. class MockActionSheetItem: ActionSheetItem {
  10. var handleTapInvokeCount = 0
  11. var handleTapInvokeActionSheets = [ActionSheet]()
  12. var cell: ActionSheetItemCell?
  13. override func handleTap(in actionSheet: ActionSheet) {
  14. super.handleTap(in: actionSheet)
  15. handleTapInvokeCount += 1
  16. handleTapInvokeActionSheets.append(actionSheet)
  17. }
  18. override func cell(for tableView: UITableView) -> ActionSheetItemCell {
  19. return cell ?? super.cell(for: tableView)
  20. }
  21. }