diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2023-02-07 20:52:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 20:52:33 +0300 |
commit | 36d7664ebab393f0033bbc25394c67e3aed3efb1 (patch) | |
tree | fd18851a0c825de108f70e7d8cf377451b51769a /test | |
parent | c997f9af697c6f09143d4b0f5305332e7adb71f5 (diff) |
PHP: Allow 'version:none' (#439)feature_php_1.1.2
* PHP: Allow 'version:none'
* fix tests
Diffstat (limited to 'test')
-rw-r--r-- | test/php/install_additional_php.sh | 2 | ||||
-rw-r--r-- | test/php/install_only_composer.sh | 10 | ||||
-rw-r--r-- | test/php/install_php_8.sh | 1 | ||||
-rw-r--r-- | test/php/install_php_8_2.sh | 1 | ||||
-rw-r--r-- | test/php/scenarios.json | 9 | ||||
-rwxr-xr-x | test/php/test.sh | 2 |
6 files changed, 24 insertions, 1 deletions
diff --git a/test/php/install_additional_php.sh b/test/php/install_additional_php.sh index 590187a..f22315a 100644 --- a/test/php/install_additional_php.sh +++ b/test/php/install_additional_php.sh @@ -9,5 +9,7 @@ check "php version 8.1.4 installed as default" php --version | grep 8.1.4 check "php version 8.0.17 installed" ls -l /usr/local/php | grep 8.0.17 check "php version 8.0.3 installed" ls -l /usr/local/php | grep 8.0.3 +check "composer-version" composer --version + # Report result reportResults diff --git a/test/php/install_only_composer.sh b/test/php/install_only_composer.sh new file mode 100644 index 0000000..c940ece --- /dev/null +++ b/test/php/install_only_composer.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +check "composer-version" composer --version + +# Report result +reportResults diff --git a/test/php/install_php_8.sh b/test/php/install_php_8.sh index a510525..0b79533 100644 --- a/test/php/install_php_8.sh +++ b/test/php/install_php_8.sh @@ -6,6 +6,7 @@ set -e source dev-container-features-test-lib check "php-version-8-is-installed" bash -c "php --version | grep '8.'" +check "composer-version" composer --version # Report result reportResults diff --git a/test/php/install_php_8_2.sh b/test/php/install_php_8_2.sh index 9320268..7427229 100644 --- a/test/php/install_php_8_2.sh +++ b/test/php/install_php_8_2.sh @@ -6,6 +6,7 @@ set -e source dev-container-features-test-lib check "php-version-8.2-is-installed" bash -c "php --version | grep '8.2'" +check "composer-version" composer --version # Report result reportResults diff --git a/test/php/scenarios.json b/test/php/scenarios.json index dac7998..1e4df06 100644 --- a/test/php/scenarios.json +++ b/test/php/scenarios.json @@ -23,5 +23,14 @@ "version": "8.2" } } + }, + "install_only_composer": { + "image": "mcr.microsoft.com/devcontainers/php:latest", + "features": { + "php": { + "version": "none", + "installComposer": true + } + } } } diff --git a/test/php/test.sh b/test/php/test.sh index 0f49c1a..c75f7ea 100755 --- a/test/php/test.sh +++ b/test/php/test.sh @@ -7,7 +7,7 @@ source dev-container-features-test-lib check "PHP version" php --version check "Mbstring loaded" php -r "extension_loaded('mbstring') || throw new Error('Extension Mbstring is not loaded');" -check "Composer version" composer --version +check "composer-version" composer --version # Report result reportResults
\ No newline at end of file |