Skip to content

thedrum-developers/docker-phpunit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supported tags and respective Dockerfile links

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

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages