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:
@@ -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)"))
|
||||
|
||||
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user