Public | Automated Build

Last pushed: 4 months ago
Short Description
PHPUnit is a programmer-oriented testing framework for PHP.
Full Description

PHPUnit Docker Container.

Docker container to install and run PHPUnit.


Installation / Usage

  1. Install the phpunit/phpunit container:

     $ docker pull phpunit/phpunit
  2. Create a phpunit.xml defining your tests suites.

  3. Run PHPUnit through the PHPUnit container:

     $ docker run -v $(pwd):/app --rm phpunit/phpunit run

    or in shorthand add

     $ sudo sh -c "printf \"#!/bin/sh
     export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
     docker run -v $(pwd):/app --rm phpunit/phpunit run \\\$@
     \" > /usr/local/bin/phpunit"
     $ sudo chmod +x /usr/local/bin/phpunit

    and then from host machine just

     $ phpunit --version

To run, test and develop the PHPUnit Dockerfile itself, you must use the source directly:

  1. Download the source:

     $ git clone
  2. Switch to the phpunit-docker directory:

     $ cd phpunit-docker
  3. Build the container:

     $ docker build -t phpunit/phpunit .
  4. Test running the container:

     $ docker run phpunit/phpunit --help

How to generate?

Install associate GEMs

$ gem install bundle
$ bundle

Generate a new version

version=6.5.3 rake version:add

Remove a version

An error in your generation?

version=6.5.3 rake version:remove
Docker Pull Command
Source Repository