1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-07 03:50:08 +02:00

👌 Include brew (un)link commands for tests

This commit is contained in:
2022-11-02 20:08:15 +01:00
parent f2d5b94831
commit 4de7179d1c
2 changed files with 23 additions and 2 deletions

View File

@ -22,7 +22,10 @@ class PhpConfigWatcher {
init(for url: URL) { init(for url: URL) {
if FileSystem is TestableFileSystem { if FileSystem is TestableFileSystem {
fatalError("PhpConfigWatcher is not compatible with testable FS! You are not allowed to instantiate these while using a testable FS.") fatalError("""
PhpConfigWatcher is not compatible with testable FS! "
You are not allowed to instantiate these while using a testable FS.
""")
} }
self.url = url self.url = url

View File

@ -135,7 +135,25 @@ class TestableConfigurations {
"/opt/homebrew/bin/brew services info --all --json" "/opt/homebrew/bin/brew services info --all --json"
: .instant(ShellStrings.shared.brewServicesAsUser), : .instant(ShellStrings.shared.brewServicesAsUser),
"curl -s --max-time 5 '\(Constants.Urls.StableBuildCaskFile.absoluteString)' | grep version" "curl -s --max-time 5 '\(Constants.Urls.StableBuildCaskFile.absoluteString)' | grep version"
: .instant("version '5.6.2_976'") : .instant("version '5.6.2_976'"),
"/opt/homebrew/bin/brew unlink php"
: .delayed(0.2, "OK"),
"/opt/homebrew/bin/brew link php --overwrite --force"
: .delayed(0.2, "OK"),
"sudo /opt/homebrew/bin/brew services stop php"
: .delayed(0.2, "OK"),
"sudo /opt/homebrew/bin/brew services start php"
: .delayed(0.2, "OK"),
"sudo /opt/homebrew/bin/brew services stop nginx"
: .delayed(0.2, "OK"),
"sudo /opt/homebrew/bin/brew services start nginx"
: .delayed(0.2, "OK"),
"sudo /opt/homebrew/bin/brew services stop dnsmasq"
: .delayed(0.2, "OK"),
"sudo /opt/homebrew/bin/brew services start dnsmasq"
: .delayed(0.2, "OK"),
"ln -sF ~/.config/valet/valet81.sock ~/.config/valet/valet.sock"
: .instant("OK"),
], ],
commandOutput: [ commandOutput: [
"/opt/homebrew/bin/php-config --version": "8.1.10", "/opt/homebrew/bin/php-config --version": "8.1.10",