kin-jacques/punigen 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kin-jacques/punigen

Composer 安装命令:

composer require kin-jacques/punigen

包简介

A Symfony MakerBundle extension to automatically generate test files for PHP classes, streamlining the testing process.

README 文档

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

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-11