Forráskód Böngészése

Merge pull request #1044 from MBonell/606-test-php-hello-world

Add test for php-cli image
yosifkit 10 éve
szülő
commit
e96d78677e

+ 1 - 0
test/config.sh

@@ -79,6 +79,7 @@ declare -A imageTests=(
 	'
 	[php]='
 		php-ext-install
+		php-hello-world
 	'
 	[php:fpm]='
 		php-fpm-hello-web

+ 1 - 0
test/tests/php-hello-world/expected-std-out.txt

@@ -0,0 +1 @@
+Hello World!

+ 1 - 0
test/tests/php-hello-world/index.php

@@ -0,0 +1 @@
+<?php echo "Hello World!"; ?>

+ 7 - 0
test/tests/php-hello-world/run.sh

@@ -0,0 +1,7 @@
+#!/bin/bash
+
+image="$1"
+dirTest="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+dirContainer='/var/www/html/hello-world'
+
+docker run -it --rm -v "$dirTest":"$dirContainer" -w "$dirContainer" "$image" php index.php