lint/phpunit/require-method-casing
In the lint-recommended preset and every stricter one. Needs the phpunit extension. Safe fix.
What it does
Enforce camel (or snake) case for PHPUnit test methods, following configuration.
Configuration
[lint.rules]
"phpunit/require-method-casing" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Options
| Name | Type | Allowed values | Default | Upstream name |
|---|---|---|---|---|
case |
enum |
camel-case, snake-case |
"camel-case" |
case |
Replaces
php_unit_method_casing(php-cs-fixer)
Linked rules
- Conflicts with
lint/phpunit/prefer-snake-case-test-names. You cannot enable both.