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

👌 FileSystem changes, rework and testing

This commit is contained in:
2022-11-01 13:47:16 +01:00
parent e8c85f93f9
commit 8417d637fe
26 changed files with 299 additions and 82 deletions

View File

@ -14,6 +14,8 @@ class TestableConfigurations {
return TestableConfiguration(
architecture: "arm64",
filesystem: [
"/usr/local/bin/"
: .fake(.directory, readOnly: true),
"/opt/homebrew/bin/brew"
: .fake(.binary),
"/opt/homebrew/bin/php"
@ -30,10 +32,21 @@ class TestableConfigurations {
: .fake(.binary),
"/opt/homebrew/Cellar/php/8.1.10_1/bin/php-config"
: .fake(.binary),
"~/.config/valet"
"/Users/user/.config/valet"
: .fake(.directory),
"/Users/user/.config/valet/config.json"
: .fake(.text, """
{
"tld": "test",
"paths": [
"/Users/user/.config/valet/Sites",
"/Users/user/Sites"
],
"loopback": "127.0.0.1"
}
"""),
"/opt/homebrew/etc/php/8.1/php-fpm.d/valet-fpm.conf"
: .fake(.text)
: .fake(.text),
],
shellOutput: [
"sysctl -n sysctl.proc_translated"

View File

@ -1,6 +1,6 @@
//
// Utility.swift
// phpmon-tests
// PHP Monitor
//
// Created by Nico Verbruggen on 14/02/2021.
// Copyright © 2022 Nico Verbruggen. All rights reserved.