mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-06 11:30:08 +02:00
26 lines
534 B
Swift
26 lines
534 B
Swift
//
|
|
// Shell.swift
|
|
// PHP Monitor
|
|
//
|
|
// Created by Nico Verbruggen on 20/09/2022.
|
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
var Shell: ShellProtocol {
|
|
return ActiveShell.shared
|
|
}
|
|
|
|
class ActiveShell {
|
|
static var shared: ShellProtocol = RealShell()
|
|
|
|
public static func useTestable(_ expectations: [String: BatchFakeShellOutput]) {
|
|
Self.shared = TestableShell(expectations: expectations)
|
|
}
|
|
|
|
public static func useSystem() {
|
|
Self.shared = RealShell()
|
|
}
|
|
}
|