mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-03-28 23:00:07 +01:00
♻️ Cleanup phase 1
This commit is contained in:
@@ -117,7 +117,6 @@ public struct TestableConfiguration: Codable {
|
||||
|
||||
// MARK: Interactions
|
||||
|
||||
#warning("This method should replace the container's resolved classes with the fake ones.")
|
||||
func apply() {
|
||||
Log.separator()
|
||||
Log.info("USING TESTABLE CONFIGURATION...")
|
||||
|
||||
@@ -119,7 +119,8 @@ class Startup {
|
||||
// =================================================================================
|
||||
EnvironmentCheck(
|
||||
command: {
|
||||
return await !App.shared.container.shell.pipe("ls \(App.shared.container.paths.optPath) | grep php").out.contains("php")
|
||||
return await !App.shared.container.shell
|
||||
.pipe("ls \(App.shared.container.paths.optPath) | grep php").out.contains("php")
|
||||
},
|
||||
name: "`ls \(App.shared.container.paths.optPath) | grep php` returned php result",
|
||||
titleText: "startup.errors.php_opt.title".localized,
|
||||
@@ -176,14 +177,16 @@ class Startup {
|
||||
// functioning correctly. Let the user know that they need to run `valet trust`.
|
||||
// =================================================================================
|
||||
EnvironmentCheck(
|
||||
command: { return await !App.shared.container.shell.pipe("cat /private/etc/sudoers.d/brew").out.contains(App.shared.container.paths.brew) },
|
||||
command: { return await !App.shared.container.shell
|
||||
.pipe("cat /private/etc/sudoers.d/brew").out.contains(App.shared.container.paths.brew) },
|
||||
name: "`/private/etc/sudoers.d/brew` contains brew",
|
||||
titleText: "startup.errors.sudoers_brew.title".localized,
|
||||
subtitleText: "startup.errors.sudoers_brew.subtitle".localized,
|
||||
descriptionText: "startup.errors.sudoers_brew.desc".localized
|
||||
),
|
||||
EnvironmentCheck(
|
||||
command: { return await !App.shared.container.shell.pipe("cat /private/etc/sudoers.d/valet").out.contains(App.shared.container.paths.valet) },
|
||||
command: { return await !App.shared.container.shell
|
||||
.pipe("cat /private/etc/sudoers.d/valet").out.contains(App.shared.container.paths.valet) },
|
||||
name: "`/private/etc/sudoers.d/valet` contains valet",
|
||||
titleText: "startup.errors.sudoers_valet.title".localized,
|
||||
subtitleText: "startup.errors.sudoers_valet.subtitle".localized,
|
||||
|
||||
@@ -59,7 +59,8 @@ class BrewDiagnostics {
|
||||
Determines whether to use the regular `nginx` or `nginx-full` formula.
|
||||
*/
|
||||
public var usesNginxFullFormula: Bool {
|
||||
guard let destination = try? filesystem.getDestinationOfSymlink("\(container.paths.binPath)/nginx") else { return false }
|
||||
guard let destination = try? filesystem
|
||||
.getDestinationOfSymlink("\(container.paths.binPath)/nginx") else { return false }
|
||||
|
||||
// Verify that the `nginx` binary is symlinked to a directory that includes `nginx-full`.
|
||||
return destination.contains("/nginx-full/")
|
||||
|
||||
@@ -12,6 +12,20 @@
|
||||
|
||||
},
|
||||
"testTargets" : [
|
||||
{
|
||||
"target" : {
|
||||
"containerPath" : "container:PHP Monitor.xcodeproj",
|
||||
"identifier" : "C471E7AC28F9B4940021E251",
|
||||
"name" : "Feature Tests"
|
||||
}
|
||||
},
|
||||
{
|
||||
"target" : {
|
||||
"containerPath" : "container:PHP Monitor.xcodeproj",
|
||||
"identifier" : "C471E7BB28F9B90F0021E251",
|
||||
"name" : "UI Tests"
|
||||
}
|
||||
},
|
||||
{
|
||||
"parallelizable" : false,
|
||||
"target" : {
|
||||
|
||||
Reference in New Issue
Block a user