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

Add testable configuration for Valet-free env

This commit is contained in:
2023-01-17 19:16:36 +01:00
parent c6f2167c92
commit 89642de12e
8 changed files with 181 additions and 28 deletions

View File

@ -10,6 +10,7 @@ import XCTest
class TestableConfigurationTest: XCTestCase {
func test_configuration_can_be_saved_as_json() async {
// WORKING
var configuration = TestableConfigurations.working
try! configuration.toJson().write(
@ -18,6 +19,16 @@ class TestableConfigurationTest: XCTestCase {
encoding: .utf8
)
// WORKING (WITHOUT VALET)
let valetFreeConfiguration = TestableConfigurations.workingWithoutValet
try! valetFreeConfiguration.toJson().write(
toFile: NSHomeDirectory() + "/.phpmon_fconf_working_no_valet.json",
atomically: true,
encoding: .utf8
)
// NOT WORKING
configuration.filesystem["/opt/homebrew/bin/php"] = nil
try! configuration.toJson().write(