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

Fix tests

This commit is contained in:
2023-05-15 19:15:02 +02:00
parent 0fe9281e3c
commit 7f04dd5fcb
3 changed files with 5 additions and 6 deletions

View File

@ -20,15 +20,14 @@ class HomebrewUpgradableTest: XCTestCase {
: .instant(try! String(contentsOf: Self.outdatedFileUrl))
])
let env = PhpEnv.shared
let env = PhpEnvironments.shared
env.cachedPhpInstallations = [
"8.1": PhpInstallation("8.1.16"),
"8.2": PhpInstallation("8.2.3"),
"7.4": PhpInstallation("7.4.11")
]
let brew = Brew.shared
let data = await brew.getPhpVersions()
let data = await BrewFormulaeHandler().loadPhpVersions(loadOutdated: true)
XCTAssertTrue(data.contains(where: { formula in
formula.installedVersion == "8.1.16" && formula.upgradeVersion == "8.1.17"

View File

@ -60,7 +60,7 @@ class RealShellTest: XCTestCase {
expectation.fulfill()
}
wait(for: [expectation], timeout: 5.0)
await fulfillment(of: [expectation], timeout: 5.0)
}
func test_system_processes_run_in_parallel() async {
@ -74,6 +74,6 @@ class RealShellTest: XCTestCase {
}
await thing()
wait(for: [expectation], timeout: 1.0)
await fulfillment(of: [expectation], timeout: 5.0)
}
}

View File

@ -11,7 +11,7 @@ import XCTest
class PhpVersionDetectionTest: XCTestCase {
func test_can_detect_valid_php_versions() async throws {
let outcome = await PhpEnv.shared.extractPhpVersions(
let outcome = await PhpEnvironments.shared.extractPhpVersions(
from: [
"", // empty lines should be omitted
"php@8.0",