Sign inSign up

thedrum/phpunit

By thedrum

Updated almost 5 years ago

PHPUnit for use on thedrum/php:7-fpm instances

Image
0

10K+

thedrum/phpunit repository overview

Usage

Use latest image

docker run -it --rm -v ${PWD}:/app thedrum/phpunit -c phpunit.xml.dist

Use specific image

docker run -it --rm -v ${PWD}:/app thedrum/phpunit:7.2 -c phpunit.xml.dist

Use with Xdebug

Specify the image you wish with the -dev variant which has Xdebug installed.

The XDEBUG_CONFIG settings will attempt to connect to the Docker bridge network IP.

The PHP_IDE_CONFIG will set the server name of the debug connection to test.{current directory name}, for example test.my-api which can be used by your IDE to set server and path mappings.

docker run -it --rm \
    -e PHP_IDE_CONFIG=serverName=test.$(basename `pwd`) \
    -e XDEBUG_CONFIG="remote_host=$(docker network inspect --format='{{(index (index .IPAM.Config) 0).Gateway}}' bridge) remote_enable=1" \
    -v ${PWD}:/app thedrum/phpunit:7.2-dev -c phpunit.xml.dist

Tag summary

Content type

Image

Digest

Size

168.3 MB

Last updated

about 7 years ago

docker pull thedrum/phpunit