Skip to content

Commit

Permalink
add phpunit to docker-php command
Browse files Browse the repository at this point in the history
  • Loading branch information
devosc committed Dec 28, 2018
1 parent 1568e42 commit db574d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/docker-php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Commands:
* php
phpdbg
phpize
phpunit
php-config
Options:
--add-host list Add custom host-to-IP mapping, e.g example.com:192.168.10.10.
Expand Down Expand Up @@ -68,9 +69,9 @@ if [[ -z "${args[0]}" ]]; then
args=("-a")
else
case "${args[0]}" in
composer|git|phar|php|phpdbg|phpize|php-config ) cmd="${args[0]}"
unset "args[0]"
;;
composer|git|phar|php|phpdbg|phpize|phpunit|php-config ) cmd="${args[0]}"
unset "args[0]"
;;
esac
fi

Expand Down
8 changes: 8 additions & 0 deletions lib/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,11 @@ RUN if [ $MAIL = "true" ]; then \
echo 'sendmail_path = "/usr/sbin/ssmtp -t"' | tee $PHP_INI_DIR/conf.d/mail.ini \
&& sed -i "s/mailhub=mail/mailhub=$MAIL_HOST/g" /etc/ssmtp/ssmtp.conf \
&& sed -i "s/#FromLineOverride=YES/FromLineOverride=YES/g" /etc/ssmtp/ssmtp.conf; fi

# PHPUnit
ARG PHPUNIT=true
ARG PHPUNIT_VERSION="7.5.1"
RUN if [ $PHPUNIT = "true" ]; then \
curl -O https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar \
&& chmod +x phpunit-${PHPUNIT_VERSION}.phar \
&& mv phpunit-${PHPUNIT_VERSION}.phar /usr/local/bin/phpunit; fi

0 comments on commit db574d5

Please sign in to comment.