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

dev-main 2025-03-12 21:23 UTC

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