mirror of
https://github.com/actions/runner-images.git
synced 2025-12-29 05:17:11 +08:00
[Windows] Add PHP to the toolset (#4493)
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
Describe "PHP" {
|
||||
It "Check <ToolName> in the PATH" -TestCases @(
|
||||
@{ ToolName = "php" }
|
||||
@{ ToolName = "composer" }
|
||||
) {
|
||||
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||
It "Check PHP version" {
|
||||
$phpMajorMinor = (Get-ToolsetContent).php.version
|
||||
$phpInstalledVersion = php --version | Select-String -Pattern "PHP $phpMajorMinor"
|
||||
$phpInstalledVersion | Should -BeLike "*${phpMajorMinor}*"
|
||||
}
|
||||
|
||||
It "Check Composer in the PATH" {
|
||||
"composer --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "PHP Environment variables is set." {
|
||||
${env:PHPROOT} | Should -Not -BeNullOrEmpty
|
||||
${env:PHPROOT} | Should -Exist
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user