Download the PHP package sanmai/phpunit-double-colon-syntax without Composer
On this page you can find all versions of the php package sanmai/phpunit-double-colon-syntax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sanmai/phpunit-double-colon-syntax
More information about sanmai/phpunit-double-colon-syntax
Files in sanmai/phpunit-double-colon-syntax
Package phpunit-double-colon-syntax
Short Description Double Colon Syntax for PHPUnit
License BSD-3-Clause
Homepage https://sanmai.github.io/phpunit-double-colon-syntax/
Informations about the package phpunit-double-colon-syntax
Double Colon Syntax for PHPUnit
PHPUnit doesn't natively support the file::method syntax commonly used in other testing frameworks, such as pytest (pytest test_file.py::test_method). However, I found that AI assistants frequently suggest this syntax and even strongly believe this syntax is a thing (ChatGPT, Gemini, Claude), which is bonkers.
So it was always frustrating to see how an assistant generates a command using this syntax and fails, day after day, wasting time, tokens, context window, and my attention. Not anymore.
Now everyone can run individual test methods using the familiar file::method syntax:
But before...
Installation
That's it! No configuration needed. Works with PHPUnit 6 and above.
Usage
It works with multiple methods:
It does not work with --filter: you have to choose this or that syntax, not both.
How It Works
Uses Composer's autoloader to intercept and transform arguments before PHPUnit starts. The file::method syntax becomes file --filter method automatically. It targets specifically vendor/bin/phpunit and ignores everything else.