mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 20:10:08 +02:00
🐛 Fix #45: Adjusted regex to support spaces
This commit is contained in:
@ -27,11 +27,16 @@ class ExtensionParserTest: XCTestCase {
|
||||
return ext.name
|
||||
}
|
||||
|
||||
// These 6 should be found
|
||||
XCTAssertTrue(extensionNames.contains("xdebug"))
|
||||
XCTAssertTrue(extensionNames.contains("imagick"))
|
||||
XCTAssertTrue(extensionNames.contains("sodium-next"))
|
||||
XCTAssertTrue(extensionNames.contains("opcache"))
|
||||
XCTAssertTrue(extensionNames.contains("yaml"))
|
||||
XCTAssertTrue(extensionNames.contains("custom"))
|
||||
|
||||
XCTAssertFalse(extensionNames.contains("fake"))
|
||||
XCTAssertFalse(extensionNames.contains("nice"))
|
||||
}
|
||||
|
||||
func testExtensionStatusIsCorrect() throws {
|
||||
@ -47,7 +52,7 @@ class ExtensionParserTest: XCTestCase {
|
||||
func testToggleWorksAsExpected() throws {
|
||||
let destination = Utility.copyToTemporaryFile(resourceName: "php", fileExtension: "ini")!
|
||||
let extensions = PhpExtension.load(from: destination)
|
||||
XCTAssertEqual(extensions.count, 4)
|
||||
XCTAssertEqual(extensions.count, 6)
|
||||
|
||||
// Try to disable xdebug (should be detected first)!
|
||||
let xdebug = extensions.first!
|
||||
|
@ -1,8 +1,16 @@
|
||||
# These should be detected
|
||||
|
||||
zend_extension="xdebug.so"
|
||||
; zend_extension="imagick.so"
|
||||
zend_extension=/opt/homebrew/opt/php/lib/php/20200930/opcache.so
|
||||
zend_extension="/opt/homebrew/opt/php/lib/php/20200930/yaml.so"
|
||||
#zend_extension="/opt/homebrew/opt/php/lib/php/20200930/fake.so"
|
||||
;zend_extension="sodium-next.so"
|
||||
extension = custom.so
|
||||
|
||||
# These should not be detected
|
||||
|
||||
#zend_extension="/opt/homebrew/opt/php/lib/php/20200930/commented.so"
|
||||
hextension = nice.so
|
||||
|
||||
[PHP]
|
||||
|
||||
|
Reference in New Issue
Block a user