prolic/humus-phpunit-module

This package is abandoned and no longer maintained. No replacement package was suggested.

PHPUnit Module for Zend Framework 2

1.1.4 2014-07-07 16:50 UTC

This package is auto-updated.

Last update: 2020-03-09 18:03:10 UTC


README

Build Status Coverage Status Total Downloads Latest Stable Version Latest Unstable Version Dependency Status

Humus PHPUnit Module is a Module for Zend Framework 2 for unit testing. It is able to test all your zf2 modules and libraries at once.

If you install this module via composer, you will get phpunit installed via composer in your vendor directory, too. You don't have to have a running PHPUnit installation in your system, it will be installed as dependency.

You can also download and test the Humus PHPUnit Module Sample Application at https://github.com/prolic/HumusPHPUnitModuleSampleApp

UPDATES IN 1.2.0

  • Full ZF2 cli integration: You can start humusphpunit with "php public/index.php humusphpunit" The old way of "vendor/bin/humusphpunit" still works
  • Support for passing parameters to phpunit like: "--strict", "--debug", "--version", and so on.
  • Support for new parameters specific to HumusPHPUnitModule like: "--modules=" and "stop-on-module-failure"
  • Get list of available options with: "php public/index.php" or "php public/index.php humusphpunit --help"
  • Colorized output in console
  • Test coverage

UPDATES IN 1.1.0

  • Remove PHPUnitListener - ATTENTION: THIS IS A BC BREAK !!! You have to configure humus phpunit module with your module config from now on.
  • Remove dependency on EHER/PHPUnit, because PHPUnit now handles composer installation himself.
  • Remove dependency on complete Zend Framework 2, instead the required components are defined as dependency.

Dependencies

Suggestions

Installation

  1. Add "prolic/humus-phpunit-module": "1.*" to your composer.json
  2. Run php composer.phar install
  3. Enable the module in your config/application.config.php by adding HumusPHPUnitModule to modules

Usage

php public/index.php humusphpunit

or

./vendor/bin/humusphpunit

get help

php public/index.php humusphpunit --help

or

php public/index.php

Configuration

Sample configuration:

<?php
return array(
    'humus_phpunit_module' => array(
        'phpunit_runner' => array(
            'Doctrine\Common' => array(
                'vendor/doctrine/common/phpunit.xml.dist'
            )
        )
    )
);