Skip to content

Commit b836354

Browse files
authored
Fix installing decimal extension (#96)
1 parent 1000991 commit b836354

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

PhpManager/public/Install-PhpExtension.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@
176176
$additionalFiles += $libcouchbaseDll
177177
}
178178
}
179+
'decimal' {
180+
$libmpdecDll = Join-Path -Path $tempFolder -ChildPath 'libmpdec.dll'
181+
if (Test-Path -LiteralPath $libmpdecDll -PathType Leaf) {
182+
$additionalFiles += $libmpdecDll
183+
}
184+
}
179185
'imagick' {
180186
$additionalFiles += @(Get-ChildItem -Path $tempFolder\CORE_*.dll -File -Depth 1)
181187
$additionalFiles += @(Get-ChildItem -Path $tempFolder\IM_*.dll -File -Depth 1)

test/tests/Install-Enable-Extensions.Tests.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@
116116
$couchbase.Type | Should -BeExactly 'Php'
117117
$couchbase.State | Should -BeExactly 'Enabled'
118118
}
119+
It -Name 'should download and install decimal on PHP <version>' -TestCases $testCases {
120+
param ($path, $version)
121+
Get-PhpExtension -Path $path | Where-Object { $_.Handle -eq 'decimal' } | Should -HaveCount 0
122+
Install-PhpExtension -Extension decimal -Path $path
123+
$decimal = Get-PhpExtension -Path $path | Where-Object { $_.Handle -eq 'decimal' }
124+
$decimal | Should -HaveCount 1
125+
$decimal.Type | Should -BeExactly 'Php'
126+
$decimal.State | Should -BeExactly 'Enabled'
127+
}
119128
It -Name 'should handle multiple extension versions' {
120129
$phpPath = Join-Path -Path $Global:PHPMANAGER_TESTINSTALLS -ChildPath (New-Guid).Guid
121130
Install-Php -Version 7.1 -Architecture x64 -ThreadSafe $true -Path $phpPath

0 commit comments

Comments
 (0)