Skip to content

Commit 19d76ba

Browse files
committed
Test installing amqp
1 parent b7f091f commit 19d76ba

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,20 @@
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) -lt [Version]'7.4') {
133+
$amqpVersion = '1.11.0'
134+
} else {
135+
$amqpVersion = 'stable'
136+
}
137+
Install-PhpExtension -Extension amqp -Path $path -Version $amqpVersion
138+
$amqp = Get-PhpExtension -Path $path | Where-Object { $_.Handle -eq 'amqp' }
139+
$amqp | Should -HaveCount 1
140+
$amqp.Type | Should -BeExactly 'Php'
141+
$amqp.State | Should -BeExactly 'Enabled'
142+
}
129143
It -Name 'should handle multiple extension versions' {
130144
$phpPath = Join-Path -Path $Global:PHPMANAGER_TESTINSTALLS -ChildPath (New-Guid).Guid
131145
Install-Php -Version 7.1 -Architecture x64 -ThreadSafe $true -Path $phpPath

0 commit comments

Comments
 (0)