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

dev-main / 0.1.x-dev 2026-01-11 21:05 UTC

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.xml configuration
  • 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

"Because every Mate needs Mates"