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

Fix unit tests

This commit is contained in:
2025-10-16 19:00:02 +02:00
parent 515f7d59a4
commit c43f16d0d5
2 changed files with 5 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ final class InternalSwitcherTest: FeatureTestCase {
"/opt/homebrew/etc/php/8.1/php-fpm.d/www.conf": .fake(.text)
]), fs = c.filesystem as! TestableFileSystem
let outcome = await InternalSwitcher(container: c)
let outcome = await InternalSwitcher(c)
.disableDefaultPhpFpmPool("8.1")
XCTAssertTrue(outcome)
@@ -24,15 +24,15 @@ final class InternalSwitcherTest: FeatureTestCase {
}
public func testExistingDisabledByPhpMonFileIsRemoved() async {
let c = Container.fake(files: [
let container = Container.fake(files: [
"/opt/homebrew/etc/php/8.1/php-fpm.d/www.conf": .fake(.text, "system generated"),
"/opt/homebrew/etc/php/8.1/php-fpm.d/www.conf.disabled-by-phpmon": .fake(.text, "phpmon generated")
]), fs = c.filesystem as! TestableFileSystem
]), fs = container.filesystem as! TestableFileSystem
assertFileHasContents("/opt/homebrew/etc/php/8.1/php-fpm.d/www.conf.disabled-by-phpmon",
contents: "phpmon generated", in: fs)
let outcome = await InternalSwitcher(container: c).disableDefaultPhpFpmPool("8.1")
let outcome = await InternalSwitcher(container).disableDefaultPhpFpmPool("8.1")
XCTAssertTrue(outcome)
assertFileSystemHas("/opt/homebrew/etc/php/8.1/php-fpm.d/www.conf.disabled-by-phpmon", in: fs)

View File

@@ -47,7 +47,7 @@ struct HomebrewUpgradableTest {
"7.4": PhpInstallation(container, "7.4.11")
]
let data = await BrewPhpFormulaeHandler(container: container)
let data = await BrewPhpFormulaeHandler(container)
.loadPhpVersions(loadOutdated: true)
#expect(true == data.contains(where: { formula in