File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 170170 }
171171 $dllPath = $phpDlls [0 ].FullName
172172 switch ($peclPackageHandle ) {
173+ ' amqp' {
174+ $tmp = Get-ChildItem - Path $tempFolder \rabbit* .dll - File - Depth 1
175+ if ($tmp ) {
176+ $additionalFiles += $tmp
177+ }
178+ }
173179 ' couchbase' {
174180 $libcouchbaseDll = Join-Path - Path $tempFolder - ChildPath ' libcouchbase.dll'
175181 if (Test-Path - LiteralPath $libcouchbaseDll - PathType Leaf) {
Original file line number Diff line number Diff line change 126126 $decimal.Type | Should - BeExactly ' Php'
127127 $decimal.State | Should - BeExactly ' Enabled'
128128 }
129+ It - Name ' should download and install amqp on PHP <version>' - TestCases $testCases {
130+ param ($path , $version )
131+ Get-PhpExtension - Path $path | Where-Object { $_.Handle -eq ' amqp' } | Should - HaveCount 0
132+ if ([Version ]$version -ge [Version ]' 7.4' ) {
133+ $amqpVersion = ' 2.1.2'
134+ } elseif ([Version ]$version -ge [Version ]' 7.3' ) {
135+ $amqpVersion = ' 1.11.0'
136+ } elseif ([Version ]$version -ge [Version ]' 7.2' ) {
137+ $amqpVersion = ' 1.10.2'
138+ } else {
139+ $amqpVersion = ' 1.9.4'
140+ }
141+ Install-PhpExtension - Extension amqp - Path $path - Version $amqpVersion
142+ $amqp = Get-PhpExtension - Path $path | Where-Object { $_.Handle -eq ' amqp' }
143+ $amqp | Should - HaveCount 1
144+ $amqp.Type | Should - BeExactly ' Php'
145+ $amqp.State | Should - BeExactly ' Enabled'
146+ }
129147 It - Name ' should handle multiple extension versions' {
130148 $phpPath = Join-Path - Path $Global :PHPMANAGER_TESTINSTALLS - ChildPath (New-Guid ).Guid
131149 Install-Php - Version 7.1 - Architecture x64 - ThreadSafe $true - Path $phpPath
You can’t perform that action at this time.
0 commit comments