paulthebaud / phpunit-generator
A PHPUnit 6 / 7 tests skeletons generator
Installs: 6 817
Dependents: 12
Suggesters: 0
Security: 0
Stars: 35
Watchers: 5
Forks: 3
Open Issues: 0
Requires
- php: ~7.1
- doctrine/collections: ^1.5
- doctrine/lexer: ^1.0
- league/flysystem: ^1.0
- nikic/php-parser: ^4.0
- psr/container: ^1.0.0
- respect/validation: ^1.1
- slim/php-view: ^2.2
- symfony/console: ^4.0
- symfony/stopwatch: ^4.0
- symfony/yaml: ^4.0
Requires (Dev)
- php-coveralls/php-coveralls: ^2.1
- phploc/phploc: ^4.0
- phpunit/phpunit: ^8.0|^7.0
- squizlabs/php_codesniffer: ^3.0
README
⚠️ Repository and package abandonned ⚠️
This repository and the paulthebaud/phpunit-generator
package are abandonned, in favor of the new version you can check out here. If you want to use as command line, use this package instead: phpunitgen/console.
Following remains for historical purpose.
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.
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:
- Installation of the package.
- Usage of web application.
- Usage of command line.
- Usage of with PHP code.
- Usage of annotations.
- Communication around the PhpUnitGen project.
Running tests
$ composer test
Contributing
Please see CONTRIBUTING for more details.
Credits
License
The MIT License (MIT). Please see License File for more information.