1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2026-04-04 18:30:09 +02:00

Add test plan, fix unit tests

This commit is contained in:
2022-10-14 17:10:58 +02:00
parent 008603b8c3
commit d91e16d674
7 changed files with 130 additions and 6 deletions

View File

@@ -13,7 +13,8 @@ class CommandTest: XCTestCase {
func testDeterminePhpVersion() {
let version = Command.execute(
path: Paths.php,
arguments: ["-v"]
arguments: ["-v"],
trimNewlines: false
)
XCTAssert(version.contains("(cli)"))

View File

@@ -16,7 +16,7 @@ class SystemShellTest: XCTestCase {
}
func test_system_shell_is_default() async {
XCTAssertTrue(Shell is SystemShell)
XCTAssertTrue(Shell is RealShell)
let output = await Shell.pipe("php -v")
@@ -24,7 +24,7 @@ class SystemShellTest: XCTestCase {
}
func test_system_shell_has_path() {
let systemShell = Shell as! SystemShell
let systemShell = Shell as! RealShell
XCTAssertTrue(systemShell.PATH.contains(":/usr/local/bin"))
XCTAssertTrue(systemShell.PATH.contains(":/usr/bin"))