mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-08 04:20:07 +02:00
31 lines
794 B
Swift
31 lines
794 B
Swift
//
|
|
// TestableConfigurationTest.swift
|
|
// PHP Monitor
|
|
//
|
|
// Created by Nico Verbruggen on 16/10/2022.
|
|
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
|
//
|
|
|
|
import XCTest
|
|
|
|
class TestableConfigurationTest: XCTestCase {
|
|
func test_configuration_can_be_saved_as_json() async {
|
|
var configuration = TestableConfigurations.working
|
|
|
|
try! configuration.toJson().write(
|
|
toFile: NSHomeDirectory() + "/.phpmon_fconf_working.json",
|
|
atomically: true,
|
|
encoding: .utf8
|
|
)
|
|
|
|
configuration.filesystem["/opt/homebrew/bin/php"] = nil
|
|
|
|
try! configuration.toJson().write(
|
|
toFile: NSHomeDirectory() + "/.phpmon_fconf_broken.json",
|
|
atomically: true,
|
|
encoding: .utf8
|
|
)
|
|
}
|
|
}
|
|
|