Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

PHPUnit Docker Container

Docker container to install and run PHPUnit.

Ripped off from phpunit/phpunit but with added xdebug!

Features

Installation / Usage

  1. Install the gabriel403/phpunit container:

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

     <?xml version="1.0" encoding="UTF-8"?>
    
     <phpunit backupGlobals="false"
              backupStaticAttributes="false"
              colors="true"
              convertErrorsToExceptions="true"
              convertNoticesToExceptions="true"
              convertWarningsToExceptions="true"
              processIsolation="false"
              stopOnFailure="false"
              syntaxCheck="false"
              bootstrap="tests/phpunit/bootstrap.php"
     >
         <testsuites>
             <testsuite name="My Test Suite">
                 <directory>./tests/phpunit/</directory>
             </testsuite>
         </testsuites>
    
         <logging>
             <log type="coverage-html" target="build/coverage"/>
             <log type="coverage-clover" target="build/logs/clover.xml"/>
         </logging>
    
         <filter>
             <whitelist>
                 <directory>./src/</directory>
             </whitelist>
         </filter>
     </phpunit>
    
  3. Run PHPUnit through the PHPUnit container:

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

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

  1. Download the source:

     $ git clone https://github.com/gabriel403/docker-phpunit.git
    
  2. Switch to the docker-phpunit directory:

     $ cd docker-phpunit
    
  3. Build the container:

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

     $ docker run gabriel403/phpunit --help
    
Docker Pull Command
Owner
gabriel403
Source Repository

Comments (0)