mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-12-23 03:40:08 +01:00
👌 Fix warnings
This commit is contained in:
@@ -26,7 +26,7 @@ class FakeShellTest: XCTestCase {
|
|||||||
.delayed(2, "Goodbye world")
|
.delayed(2, "Goodbye world")
|
||||||
])
|
])
|
||||||
|
|
||||||
let output = await greeting.output(didReceiveOutput: { output, _ in })
|
let output = await greeting.output(didReceiveOutput: { _, _ in })
|
||||||
|
|
||||||
XCTAssertEqual("Hello world\nGoodbye world", output.out)
|
XCTAssertEqual("Hello world\nGoodbye world", output.out)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,11 @@ class ActivePhpInstallation {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Return a list of .ini files parsed after php.ini
|
// Return a list of .ini files parsed after php.ini
|
||||||
let paths = Command.execute(path: Paths.php, arguments: ["-r", "echo php_ini_scanned_files();"], trimNewlines: false)
|
let paths = Command.execute(
|
||||||
|
path: Paths.php,
|
||||||
|
arguments: ["-r", "echo php_ini_scanned_files();"],
|
||||||
|
trimNewlines: false
|
||||||
|
)
|
||||||
.replacingOccurrences(of: "\n", with: "")
|
.replacingOccurrences(of: "\n", with: "")
|
||||||
.split(separator: ",")
|
.split(separator: ",")
|
||||||
.map { String($0) }
|
.map { String($0) }
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class TestableCommand: CommandProtocol {
|
|||||||
|
|
||||||
public func execute(path: String, arguments: [String], trimNewlines: Bool) -> String {
|
public func execute(path: String, arguments: [String], trimNewlines: Bool) -> String {
|
||||||
let concatenatedCommand = "\(path) \(arguments.joined(separator: " "))"
|
let concatenatedCommand = "\(path) \(arguments.joined(separator: " "))"
|
||||||
assert(commands.keys.contains(concatenatedCommand), "The expected command (\(concatenatedCommand)) was not found")
|
assert(commands.keys.contains(concatenatedCommand), "Command `\(concatenatedCommand)` not found")
|
||||||
return self.commands[concatenatedCommand]!
|
return self.commands[concatenatedCommand]!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user