[Ubuntu] Migrate php to Pester tests (#2341)

* Php Pester tests

* Minor fix
This commit is contained in:
Vladimir Safonkin
2020-12-25 13:02:25 +03:00
committed by GitHub
parent 82b4e13fb0
commit 02c2fbad69
5 changed files with 61 additions and 29 deletions

View 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
}
}