kin-jacques / punigen
A Symfony MakerBundle extension to automatically generate test files for PHP classes, streamlining the testing process.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
pkg:composer/kin-jacques/punigen
Requires
- php: >=8.0
- nikic/php-parser: ^5.4
- symfony/console: ^6.0
- symfony/finder: ^6.0
- symfony/flex: ^2.4
- symfony/process: ^6.0
- symfony/runtime: ^6.0
- symfony/yaml: ^6.0
Requires (Dev)
- phpunit/phpunit: ^10.0
- symfony/maker-bundle: ^1.0
This package is auto-updated.
Last update: 2026-01-12 22:57:01 UTC
README
PHPUnit Test Generator: A Symfony MakerBundle extension to automatically generate test files for all functions of each PHP classes in each folders (namespaces), streamlining the testing process.
Requirements
- PHP 8.0 or higher
- Symfony 6.0 or higher
- Symfony MakerBundle
Installation with Composer
composer require kin-jacques/punigen --dev
Usage
PuniGen extends the Symfony MakerBundle to provide commands for automatically generating test files for your PHP classes.
Basic Usage
# Generate test files for all functions of all classes in the src directory
php bin/console make:test-case
# Generate test files for a specific class
php bin/console make:test-case App\\Service\\ExampleService
# Generate test files for a specific function
php bin/console make:test-case App\\Service\\ExampleService --functions=exampleMethod
Feature Roadmap
- Support for Symfony 7
- Integration with PHPStan/Psalm for more intelligent test generation
- Custom assertions generation based on method return types
- Test data generators for complex types
Contributing
Contributions are welcome!
Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add some amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Kinton JACQUES - Github