matesofmate / phpunit-extension
PHPUnit extension for symfony/ai-mate providing token-optimized test execution tools
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-ai-mate
pkg:composer/matesofmate/phpunit-extension
Requires
- php: >=8.2
- helgesverre/toon: ^1.0
- matesofmate/common: ^0.1@dev
- symfony/ai-mate: ^0.1 || ^0.2@dev
- symfony/finder: ^5.4|^6.4|^7.3|^8.0
- symfony/process: ^5.4|^6.4|^7.3|^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^10.0
- rector/rector: ^2.0
This package is auto-updated.
Last update: 2026-01-11 21:05:46 UTC
README
Token-optimized PHPUnit testing tools for AI assistants. This extension provides MCP (Model Context Protocol) tools that execute PHPUnit tests and return results in TOON (Token-Oriented Object Notation) format, achieving 40-50% token reduction compared to raw PHPUnit output.
Features
- Run tests efficiently - Execute entire suite, specific files, or single methods
- TOON format output - 40-50% token reduction vs. raw PHPUnit output using helgesverre/toon
- Test discovery - List all available tests in your project
- Auto-configuration - Automatically detects
phpunit.xmlconfiguration - Fast execution - Direct Symfony Process integration with current PHP binary
- JUnit XML parsing - Structured test result extraction
Installation
composer require --dev matesofmate/phpunit-extension vendor/bin/mate discover
The extension is automatically enabled by Symfony AI Mate.
Development
Quality Commands
# Run tests composer test # Check code quality (PHPStan level 8, PHP CS Fixer, Rector) composer lint # Auto-fix code style and apply refactorings composer fix
Requirements
- PHP 8.2 or higher
- PHPUnit 10.0 or higher (installed in your project)
- Symfony AI Mate 0.1 or higher
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
License
MIT License - see LICENSE file for details.
Resources
- Symfony AI Mate Documentation
- PHPUnit Documentation
- TOON Format Specification
- MatesOfMate Organization
"Because every Mate needs Mates"