paulthebaud/phpunit-generator

A PHPUnit 6 / 7 tests skeletons generator

2.1.5 2019-03-02 19:14 UTC

README

68747470733a2f2f7261772e6769746875622e636f6d2f7061756c2d746865626175642f706870756e69742d67656e657261746f722d6173736574732f6d61737465722f6c6f676f732f6c6f676f2e7376673f73616e6974697a653d74727565

Latest Version on Packagist Minimum PHP Version Build Status Coverage Status Scrutinizer Software License Total Downloads

PhpUnitGen is an open source development tool which will help you writing your unit tests for PHPUnit 6 / 7:

  • Generate unit skeleton for all PHP files including classes, traits, interfaces and global functions.
  • Automatically generate a few simple unit tests (like getter / setter methods tests, class instantiation).

You can try and use this package on a web application, at phpunitgen.io.

Version 2 of PhpUnitGen is now available, but be careful, it breaks the PhpUnitGen 1.x.x API.

Image of PhpUnitGen rendering

Package structure

build/      ==> Build results (code coverage ...) [only after running composer test].
config/     ==> Default PhpUnitGen configurations.
examples/   ==> Examples about this package (configuration, parsing examples).
src/        ==> Package source files.
template/   ==> Package template for generated tests skeletons.
tests/      ==> Package unit tests.
vendor/     ==> Composer dependencies [only after running composer install].

Installation

Best way to install this package is with composer dependency manager.

$ composer require --dev paulthebaud/phpunit-generator ^2.0

--dev option is used to install this package only in development environment.

Documentation

PhpUnitGen documentation is available online on doc.phpunitgen.io.

It give multiple information on PhpUnitGen:

Running tests

$ composer test

Contributing

Please see CONTRIBUTING for more details.

Credits

License

The MIT License (MIT). Please see License File for more information.