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

🏗 WIP: Shell rework

This commit is contained in:
2022-09-26 20:37:24 +02:00
parent a682d0cfb0
commit 5399bddfeb
4 changed files with 61 additions and 7 deletions

View File

@@ -32,12 +32,21 @@ class ShellTest: XCTestCase {
with Xdebug v3.1.4, Copyright (c) 2002-2022, by Derick Rethans
"""
let slowVersionOutput = FakeTerminalOutput(
output: expectedPhpOutput,
duration: 1000,
isError: false
)
NxtShell.useTestable([
"php -v": expectedPhpOutput
"php -v": expectedPhpOutput,
"php --version": slowVersionOutput
])
XCTAssertTrue(NxtShell.shared is TestableShell)
XCTAssertEqual(expectedPhpOutput, NxtShell.shared.syncPipe("php -v"))
XCTAssertEqual(expectedPhpOutput, NxtShell.shared.syncPipe("php --version"))
}
}