mirror of
https://github.com/actions/runner-images.git
synced 2025-12-19 00:06:57 +00:00
[Ubuntu] Migrate php to Pester tests (#2341)
* Php Pester tests * Minor fix
This commit is contained in:
committed by
GitHub
parent
82b4e13fb0
commit
02c2fbad69
30
images/linux/scripts/tests/Common.Tests.ps1
Normal file
30
images/linux/scripts/tests/Common.Tests.ps1
Normal file
@@ -0,0 +1,30 @@
|
||||
Describe "PHP" {
|
||||
|
||||
[array]$testCases = (Get-ToolsetContent).php.versions | ForEach-Object { @{phpVersion = $_} }
|
||||
|
||||
It "php <phpVersion>" -TestCases $testCases {
|
||||
param (
|
||||
[string] $phpVersion
|
||||
)
|
||||
|
||||
"php$phpVersion --version" | Should -ReturnZeroExitCode
|
||||
"php-config$phpVersion --version" | Should -ReturnZeroExitCode
|
||||
"phpize$phpVersion --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "PHPUnit" {
|
||||
"phpunit --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Composer" {
|
||||
"composer --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Pear" {
|
||||
"pear" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Pecl" {
|
||||
"pecl" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user