Files
runner-images/images/macos/scripts/tests/PHP.Tests.ps1
T

23 lines
739 B
PowerShell
Raw Normal View History

Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
2023-12-04 12:13:08 +01:00
2021-09-24 13:56:16 +03:00
$os = Get-OSVersion
Describe "PHP" {
Context "PHP" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) {
It "PHP Path" {
2023-12-04 12:13:08 +01:00
Get-ToolPath "php" | Should -Not -BeLike "/usr/bin/php*"
}
It "PHP version" {
2023-12-04 12:13:08 +01:00
$phpVersionToolset = (Get-ToolsetContent).php.version
2021-11-21 23:11:18 +03:00
$phpInstalledVersion = php --version | Out-String | Select-String "${phpVersionToolset}"
$phpInstalledVersion | Should -BeLike "PHP ${phpVersionToolset}*"
}
}
2021-11-21 23:11:18 +03:00
Context "Composer" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) {
It "Composer" {
"composer --version" | Should -ReturnZeroExitCode
}
}
2021-11-21 23:11:18 +03:00
}